java.lang.Object
tools.jackson.databind.cfg.CoercionConfigs
- All Implemented Interfaces:
Serializable,Snapshottable<CoercionConfigs>
- Since:
- 2.12
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CoercionActionGlobal default for cases not explicitly coveredprotected final MutableCoercionConfigDefault coercion definitions used if no overrides found by logical or physical type.protected Map<Class<?>,MutableCoercionConfig> Coercion definitions by physical type (Class).protected MutableCoercionConfig[]Coercion definitions by logical type (LogicalType) -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCoercionConfigs(CoercionAction defaultAction, MutableCoercionConfig defaultCoercions, MutableCoercionConfig[] perTypeCoercions, Map<Class<?>, MutableCoercionConfig> perClassCoercions) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean_isScalarType(LogicalType targetType) findCoercion(DeserializationConfig config, LogicalType targetType, Class<?> targetClass, CoercionInputShape inputShape) General-purpose accessor for finding what to do when specified coercion from shape that is now always allowed to be coerced from is requested.findCoercionFromBlankString(DeserializationConfig config, LogicalType targetType, Class<?> targetClass, CoercionAction actionIfBlankNotAllowed) More specialized accessor called in case of input being a blank String (one consisting of only white space characters with length of at least one).findOrCreateCoercion(Class<?> type) snapshot()Method called to create a non-shared copy of configuration settings, to be used by anotherObjectMapperinstance.
-
Field Details
-
_defaultAction
Global default for cases not explicitly covered -
_defaultCoercions
Default coercion definitions used if no overrides found by logical or physical type. -
_perTypeCoercions
Coercion definitions by logical type (LogicalType) -
_perClassCoercions
Coercion definitions by physical type (Class).
-
-
Constructor Details
-
CoercionConfigs
public CoercionConfigs() -
CoercionConfigs
protected CoercionConfigs(CoercionAction defaultAction, MutableCoercionConfig defaultCoercions, MutableCoercionConfig[] perTypeCoercions, Map<Class<?>, MutableCoercionConfig> perClassCoercions)
-
-
Method Details
-
snapshot
Method called to create a non-shared copy of configuration settings, to be used by anotherObjectMapperinstance.- Specified by:
snapshotin interfaceSnapshottable<CoercionConfigs>- Returns:
- A non-shared copy of configuration settings
-
defaultCoercions
-
findOrCreateCoercion
-
findOrCreateCoercion
-
findCoercion
public CoercionAction findCoercion(DeserializationConfig config, LogicalType targetType, Class<?> targetClass, CoercionInputShape inputShape) General-purpose accessor for finding what to do when specified coercion from shape that is now always allowed to be coerced from is requested.- Parameters:
config- Currently active deserialization configurationtargetType- Logical target type of coerciontargetClass- Physical target type of coercioninputShape- Input shape to coerce from- Returns:
- CoercionAction configured for specified coercion
-
findCoercionFromBlankString
public CoercionAction findCoercionFromBlankString(DeserializationConfig config, LogicalType targetType, Class<?> targetClass, CoercionAction actionIfBlankNotAllowed) More specialized accessor called in case of input being a blank String (one consisting of only white space characters with length of at least one). Will basically first determine if "blank as empty" is allowed: if not, returnsactionIfBlankNotAllowed, otherwise returns action forCoercionInputShape.EmptyString.- Parameters:
config- Currently active deserialization configurationtargetType- Logical target type of coerciontargetClass- Physical target type of coercionactionIfBlankNotAllowed- Return value to use in case "blanks as empty" is not allowed- Returns:
- CoercionAction configured for specified coercion from blank string
-
_isScalarType
-