Class EnumValues
- java.lang.Object
-
- com.fasterxml.jackson.databind.util.EnumValues
-
- All Implemented Interfaces:
java.io.Serializable
public final class EnumValues extends java.lang.Object implements java.io.Serializable
Helper class used for storing String serializations ofEnum
s, to match to/from external representations.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EnumValues
construct(MapperConfig<?> config, java.lang.Class<java.lang.Enum<?>> enumClass, java.util.List<java.lang.String> externalValues)
static EnumValues
construct(SerializationConfig config, java.lang.Class<java.lang.Enum<?>> enumClass)
NOTE: do NOT call this if configuration may change, and choice between toString() and name() might change dynamically.static EnumValues
construct(java.lang.Class<java.lang.Enum<?>> enumClass, SerializableString[] externalValues)
static EnumValues
constructFromName(MapperConfig<?> config, java.lang.Class<java.lang.Enum<?>> enumClass)
static EnumValues
constructFromToString(MapperConfig<?> config, java.lang.Class<java.lang.Enum<?>> enumClass)
java.util.List<java.lang.Enum<?>>
enums()
Convenience accessor for getting raw Enum instances.java.lang.Class<java.lang.Enum<?>>
getEnumClass()
java.util.EnumMap<?,SerializableString>
internalMap()
Method used for serialization and introspection by core Jackson code.SerializableString
serializedValueFor(java.lang.Enum<?> key)
java.util.Collection<SerializableString>
values()
-
-
-
Method Detail
-
construct
public static EnumValues construct(SerializationConfig config, java.lang.Class<java.lang.Enum<?>> enumClass)
NOTE: do NOT call this if configuration may change, and choice between toString() and name() might change dynamically.
-
constructFromName
public static EnumValues constructFromName(MapperConfig<?> config, java.lang.Class<java.lang.Enum<?>> enumClass)
-
constructFromToString
public static EnumValues constructFromToString(MapperConfig<?> config, java.lang.Class<java.lang.Enum<?>> enumClass)
-
construct
public static EnumValues construct(MapperConfig<?> config, java.lang.Class<java.lang.Enum<?>> enumClass, java.util.List<java.lang.String> externalValues)
- Since:
- 2.11
-
construct
public static EnumValues construct(java.lang.Class<java.lang.Enum<?>> enumClass, SerializableString[] externalValues)
- Since:
- 2.11
-
serializedValueFor
public SerializableString serializedValueFor(java.lang.Enum<?> key)
-
values
public java.util.Collection<SerializableString> values()
-
enums
public java.util.List<java.lang.Enum<?>> enums()
Convenience accessor for getting raw Enum instances.- Since:
- 2.6
-
internalMap
public java.util.EnumMap<?,SerializableString> internalMap()
Method used for serialization and introspection by core Jackson code.
-
getEnumClass
public java.lang.Class<java.lang.Enum<?>> getEnumClass()
- Since:
- 2.2
-
-