Class EnumDef
java.lang.Object
dev.quantumfusion.hyphen.codegen.def.MethodDef
dev.quantumfusion.hyphen.codegen.def.EnumDef
- All Implemented Interfaces:
SerializerDef
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThis returns the absolute minimum size of the object.static <T extends Enum<T>>
T[]getValues(MethodHandles.Lookup lookup, String name, Class<T[]> cls)booleanIf this is true it will request to generate the Measure method.voidscan(SerializerHandler<?,?> handler, Clazz clazz)protected 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
-
USE_CONSTANT_DYNAMIC
public static boolean USE_CONSTANT_DYNAMIC -
USE_CONSTANT_DYNAMIC_INVOKE
public static boolean USE_CONSTANT_DYNAMIC_INVOKE
-
-
Constructor Details
-
EnumDef
-
-
Method Details
-
scan
-
getValues
public static <T extends Enum<T>> T[] getValues(MethodHandles.Lookup lookup, String name, Class<T[]> cls) -
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
-