Class PrimitiveArrayIODef

java.lang.Object
dev.quantumfusion.hyphen.codegen.def.PrimitiveArrayIODef
All Implemented Interfaces:
SerializerDef

public class PrimitiveArrayIODef extends Object implements SerializerDef
  • Field Details

    • primitiveArray

      protected final Class<?> primitiveArray
    • fixedSize

      protected final Integer fixedSize
  • Constructor Details

    • PrimitiveArrayIODef

      public PrimitiveArrayIODef(Clazz clazz, SerializerHandler<?,​?> serializerHandler)
  • Method Details

    • writePut

      public void writePut(MethodHandler mh, Runnable valueLoad)
      Description copied from interface: SerializerDef
      Writes code for encoding the Clazz the definition is designed to handle.
      Specified by:
      writePut in interface SerializerDef
      Parameters:
      mh - A MethodHandler
      valueLoad - A Runnable which pushes the Clazz value onto the stack.
    • writeGet

      public void writeGet(MethodHandler mh)
      Description copied from interface: SerializerDef
      Writes code for decoding the Clazz the definition is designed to handle.
      Specified by:
      writeGet in interface SerializerDef
      Parameters:
      mh - A MethodHandler
    • writeMeasure

      public void writeMeasure(MethodHandler mh, Runnable valueLoad)
      Description copied from interface: SerializerDef
      Writes code for measuring the size required to encode the value
      Specified by:
      writeMeasure in interface SerializerDef
      Parameters:
      mh - A MethodHandler
      valueLoad - A Runnable which pushes the Clazz value onto the stack.
    • getStaticSize

      public int getStaticSize()
      Description copied from interface: SerializerDef
      This returns the absolute minimum size of the object.
      If the size is dependent on the runtime object itself this value will be appended to the measure methods results.
      Specified by:
      getStaticSize in interface SerializerDef
      Returns:
      Object Minimum encoding size