Package com.hypixel.hytale.codec.codecs
Class EnumCodec<T extends Enum<T>>
java.lang.Object
com.hypixel.hytale.codec.codecs.EnumCodec<T>
- All Implemented Interfaces:
Codec<T>,RawJsonCodec<T>,SchemaConvertable<T>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final T[]private final String[]private final EnumCodec.EnumStyleFields inherited from interface com.hypixel.hytale.codec.Codec
BASE64_PATTERN, BOOLEAN, BSON_DOCUMENT, BYTE, BYTE_ARRAY, DOUBLE, DOUBLE_ARRAY, DURATION, DURATION_SECONDS, FLOAT, FLOAT_ARRAY, INSTANT, INT_ARRAY, INTEGER, LOG_LEVEL, LONG, LONG_ARRAY, PATH, SHORT, STRING, STRING_ARRAY, UUID_BINARY, UUID_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecodeJson(RawJsonReader reader, ExtraInfo extraInfo) documentKey(T key, String doc) org.bson.BsonValueprivate TtoSchema(SchemaContext context) toSchema(SchemaContext context, T def) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.codec.RawJsonCodec
decodeJson
-
Field Details
-
clazz
-
enumConstants
-
enumKeys
-
enumStyle
-
documentation
-
-
Constructor Details
-
EnumCodec
-
EnumCodec
-
-
Method Details
-
documentKey
-
decode
-
encode
-
decodeJson
- Specified by:
decodeJsonin interfaceCodec<T extends Enum<T>>- Specified by:
decodeJsonin interfaceRawJsonCodec<T extends Enum<T>>- Throws:
IOException
-
toSchema
- Specified by:
toSchemain interfaceSchemaConvertable<T extends Enum<T>>
-
toSchema
- Specified by:
toSchemain interfaceSchemaConvertable<T extends Enum<T>>
-
getEnum
-