public class EnumFormat extends Format
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getEnumConstants()
Returns an unmodifiable list of the names of the enum instances, or null
if this is not an enum type.
|
boolean |
isEnum()
Returns whether this is an enum type.
|
java.lang.Object |
newInstance(EntityInput input,
boolean rawAccess)
Creates a new instance of the target class using its default
constructor.
|
java.lang.Object |
readObject(java.lang.Object o,
EntityInput input,
boolean rawAccess)
Called after newInstance() to read the rest of the data bytes and fill
in the object contents.
|
getClassMetadata, getClassName, getComponentType, getDimensions, getEntityMetadata, getFields, getId, getPreviousVersion, getSuperType, getVersion, initializeReader, isArray, isPrimitive, isSimple, readPriKey, toString
public boolean isEnum()
RawType
If true is returned, a value of this type is a RawObject
and
the enum constant String is available via RawObject.getEnum()
.
If false is returned, then this is a complex type, an array type (see
RawType.isArray()
), or a simple type (see RawType.isSimple()
).
public java.util.List<java.lang.String> getEnumConstants()
RawType
getEnumConstants
in interface RawType
getEnumConstants
in class Format
public java.lang.Object newInstance(EntityInput input, boolean rawAccess)
Format
newInstance
in class Format
public java.lang.Object readObject(java.lang.Object o, EntityInput input, boolean rawAccess)
Format
readObject
in class Format