public final class EnumValues extends Object implements Serializable
Enum
s,
to match to/from external representations.Modifier and Type | Method and Description |
---|---|
static EnumValues |
construct(Class<Enum<?>> enumClass,
SerializableString[] externalValues) |
static EnumValues |
construct(MapperConfig<?> config,
Class<Enum<?>> enumClass,
List<String> externalValues) |
static EnumValues |
construct(SerializationConfig config,
Class<Enum<?>> enumClass)
NOTE: do NOT call this if configuration may change, and choice between toString()
and name() might change dynamically.
|
static EnumValues |
constructFromName(MapperConfig<?> config,
Class<Enum<?>> enumClass) |
static EnumValues |
constructFromToString(MapperConfig<?> config,
Class<Enum<?>> enumClass) |
static EnumValues |
constructUsingEnumNamingStrategy(MapperConfig<?> config,
Class<Enum<?>> enumClass,
EnumNamingStrategy namingStrategy)
Returns String serializations of Enum name using an instance of
EnumNamingStrategy . |
List<Enum<?>> |
enums()
Convenience accessor for getting raw Enum instances.
|
Class<Enum<?>> |
getEnumClass() |
EnumMap<?,SerializableString> |
internalMap()
Method used for serialization and introspection by core Jackson code.
|
SerializableString |
serializedValueFor(Enum<?> key) |
Collection<SerializableString> |
values() |
public static EnumValues construct(SerializationConfig config, Class<Enum<?>> enumClass)
public static EnumValues constructFromName(MapperConfig<?> config, Class<Enum<?>> enumClass)
public static EnumValues constructFromToString(MapperConfig<?> config, Class<Enum<?>> enumClass)
public static EnumValues constructUsingEnumNamingStrategy(MapperConfig<?> config, Class<Enum<?>> enumClass, EnumNamingStrategy namingStrategy)
EnumNamingStrategy
.
The output EnumValues
should contain values that are symmetric to
EnumResolver.constructUsingEnumNamingStrategy(DeserializationConfig, Class, EnumNamingStrategy)
.public static EnumValues construct(MapperConfig<?> config, Class<Enum<?>> enumClass, List<String> externalValues)
public static EnumValues construct(Class<Enum<?>> enumClass, SerializableString[] externalValues)
public SerializableString serializedValueFor(Enum<?> key)
public Collection<SerializableString> values()
public EnumMap<?,SerializableString> internalMap()
Copyright © 2008–2023 FasterXML. All rights reserved.