Class PrimitiveIODef
java.lang.Object
dev.quantumfusion.hyphen.codegen.def.PrimitiveIODef
- All Implemented Interfaces:
SerializerDef
- Direct Known Subclasses:
BoxedIODef
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intintThis returns the absolute minimum size of the object.booleanIf this is true it will request to generate the Measure method.voidwriteGet(MethodHandler mh)Writes code for decoding the Clazz the definition is designed to handle.voidwritePut(MethodHandler mh, Runnable valueLoad)Writes code for encoding the Clazz the definition is designed to handle.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.quantumfusion.hyphen.codegen.def.SerializerDef
writeMeasure
-
Field Details
-
primitive
-
size
protected final int size
-
-
Constructor Details
-
PrimitiveIODef
-
-
Method Details
-
getSize
-
writePut
Description copied from interface:SerializerDefWrites code for encoding the Clazz the definition is designed to handle.- Specified by:
writePutin interfaceSerializerDef- Parameters:
mh- A MethodHandlervalueLoad- A Runnable which pushes the Clazz value onto the stack.
-
writeGet
Description copied from interface:SerializerDefWrites code for decoding the Clazz the definition is designed to handle.- Specified by:
writeGetin interfaceSerializerDef- Parameters:
mh- A MethodHandler
-
getStaticSize
public int getStaticSize()Description copied from interface:SerializerDefThis 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:
getStaticSizein interfaceSerializerDef- Returns:
- Object Minimum encoding size
-
hasDynamicSize
public boolean hasDynamicSize()Description copied from interface:SerializerDefIf this is true it will request to generate the Measure method.
If this is false only the static size amount will be used.- Specified by:
hasDynamicSizein interfaceSerializerDef- Returns:
- if it has a Dynamic Size.
-