com.fasterxml.jackson.databind.util

Class EnumValues

  • All Implemented Interfaces:
    Serializable


    public final class EnumValues
    extends Object
    implements Serializable
    Helper class used for storing String serializations of Enums, to match to/from external representations.
    See Also:
    Serialized Form
    • Method Detail

      • construct

        public 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.
      • construct

        public static EnumValues construct(Class<Enum<?>> enumClass,
                                           com.fasterxml.jackson.core.SerializableString[] externalValues)
        Since:
        2.11
      • serializedValueFor

        public com.fasterxml.jackson.core.SerializableString serializedValueFor(Enum<?> key)
      • values

        public Collection<com.fasterxml.jackson.core.SerializableString> values()
      • enums

        public List<Enum<?>> enums()
        Convenience accessor for getting raw Enum instances.
        Since:
        2.6
      • internalMap

        public EnumMap<?,com.fasterxml.jackson.core.SerializableString> internalMap()
        Method used for serialization and introspection by core Jackson code.
      • getEnumClass

        public Class<Enum<?>> getEnumClass()
        Since:
        2.2

Copyright © 2008–2022 FasterXML. All rights reserved.