Class IndexedDef
java.lang.Object
dev.quantumfusion.hyphen.codegen.def.MethodDef
dev.quantumfusion.hyphen.codegen.def.IndexedDef
- All Implemented Interfaces:
SerializerDef
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Clazzprotected SerializerDefprotected Consumer<MethodHandler>protected Consumer<MethodHandler> -
Constructor Summary
ConstructorsConstructorDescriptionIndexedDef(String name, SerializerHandler<?,?> handler, Clazz clazz, Clazz component, Consumer<MethodHandler> getterFunc, Consumer<MethodHandler> lengthFunc) -
Method Summary
Modifier and TypeMethodDescriptionintThis returns the absolute minimum size of the object.booleanIf this is true it will request to generate the Measure method.voidloopArray(MethodHandler mh, Variable length, Consumer<Variable> value)voidscan(SerializerHandler<?,?> handler, Clazz clazz)abstract voidprotected voidprotected voidwriteMethodMeasure(MethodHandler mh, Runnable valueLoad)protected voidwriteMethodPut(MethodHandler mh, Runnable valueLoad)Methods inherited from class dev.quantumfusion.hyphen.codegen.def.MethodDef
writeGet, writeMeasure, writeMethods, writePut
-
Field Details
-
componentDef
-
component
-
getterFunc
-
lengthFunc
-
-
Constructor Details
-
IndexedDef
public IndexedDef(String name, SerializerHandler<?,?> handler, Clazz clazz, Clazz component, Consumer<MethodHandler> getterFunc, Consumer<MethodHandler> lengthFunc)
-
-
Method Details
-
scan
-
writeGetConverter
-
writeMethodGet
- Specified by:
writeMethodGetin classMethodDef
-
writeMethodPut
- Specified by:
writeMethodPutin classMethodDef
-
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.- 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.- Returns:
- if it has a Dynamic Size.
-
writeMethodMeasure
- Specified by:
writeMethodMeasurein classMethodDef
-
loopArray
-