com.fasterxml.jackson.databind.util

Class EnumResolver

  • All Implemented Interfaces:
    Serializable


    public class EnumResolver
    extends Object
    implements Serializable
    Helper class used to resolve String values (either JSON Object field names or regular String values) into Java Enum instances.
    See Also:
    Serialized Form
    • Field Detail

      • _enumClass

        protected final Class<Enum<?>> _enumClass
      • _enums

        protected final Enum<?>[] _enums
      • _defaultValue

        protected final Enum<?> _defaultValue
      • _isIgnoreCase

        protected final boolean _isIgnoreCase
        Marker for case-insensitive handling
        Since:
        2.12
      • _isFromIntValue

        protected final boolean _isFromIntValue
        Marker for case where value may come from @JsonValue annotated accessor and is expected/likely to come from actual integral number value (and not String).

        Special case is needed since this specifically means that Enum.index() should NOT be used or default to.

        Since:
        2.13
    • Constructor Detail

      • EnumResolver

        protected EnumResolver(Class<Enum<?>> enumClass,
                               Enum<?>[] enums,
                               HashMap<String,Enum<?>> map,
                               Enum<?> defaultValue,
                               boolean isIgnoreCase,
                               boolean isFromIntValue)
        Since:
        2.12

Copyright © 2008–2023 FasterXML. All rights reserved.