- All Implemented Interfaces:
Serializable
,Comparable<DefaultTyping>
,Constable
Enumeration used with
JsonMapper.defaultTyping()
methods
to specify what kind of types (classes) default typing should
be used for. It will only be used if no explicit type information
is found, but this enumeration further limits subset of those types.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis value means that only properties that haveObject
as declared type (including generic types without explicit type) will use default typing.Value that means that default typing will be used for all types covered byOBJECT_AND_NON_CONCRETE
plus all array types for them.Value that means that default typing will be used for all non-final types, with exception of small number of "natural" types (String, Boolean, Integer, Double), which can be correctly inferred from JSON; as well as for all arrays of non-final types.Enables default typing for non-final types asNON_FINAL
, but also includes Enums.Value that means that default typing will be used for properties with declared type ofObject
or an abstract type (abstract class or interface). -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultTyping
Returns the enum constant of this class with the specified name.static DefaultTyping[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
JAVA_LANG_OBJECT
This value means that only properties that haveObject
as declared type (including generic types without explicit type) will use default typing. -
OBJECT_AND_NON_CONCRETE
-
NON_CONCRETE_AND_ARRAYS
Value that means that default typing will be used for all types covered byOBJECT_AND_NON_CONCRETE
plus all array types for them. This does NOT apply toTreeNode
and its subtypes. -
NON_FINAL
Value that means that default typing will be used for all non-final types, with exception of small number of "natural" types (String, Boolean, Integer, Double), which can be correctly inferred from JSON; as well as for all arrays of non-final types. This does NOT apply toTreeNode
and its subtypes. -
NON_FINAL_AND_ENUMS
Enables default typing for non-final types asNON_FINAL
, but also includes Enums.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-