Class CoercionConfigs
- java.lang.Object
-
- com.fasterxml.jackson.databind.cfg.CoercionConfigs
-
- All Implemented Interfaces:
java.io.Serializable
public class CoercionConfigs extends java.lang.Object implements java.io.Serializable- Since:
- 2.12
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CoercionConfigs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoercionConfigscopy()Method called to create a non-shared copy of configuration settings, to be used by anotherObjectMapperinstance.MutableCoercionConfigdefaultCoercions()CoercionActionfindCoercion(DeserializationConfig config, LogicalType targetType, java.lang.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.CoercionActionfindCoercionFromBlankString(DeserializationConfig config, LogicalType targetType, java.lang.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).MutableCoercionConfigfindOrCreateCoercion(LogicalType type)MutableCoercionConfigfindOrCreateCoercion(java.lang.Class<?> type)
-
-
-
Method Detail
-
copy
public CoercionConfigs copy()
Method called to create a non-shared copy of configuration settings, to be used by anotherObjectMapperinstance.- Returns:
- A non-shared copy of configuration settings
-
defaultCoercions
public MutableCoercionConfig defaultCoercions()
-
findOrCreateCoercion
public MutableCoercionConfig findOrCreateCoercion(LogicalType type)
-
findOrCreateCoercion
public MutableCoercionConfig findOrCreateCoercion(java.lang.Class<?> type)
-
findCoercion
public CoercionAction findCoercion(DeserializationConfig config, LogicalType targetType, java.lang.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
- Since:
- 2.12
-
findCoercionFromBlankString
public CoercionAction findCoercionFromBlankString(DeserializationConfig config, LogicalType targetType, java.lang.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
-
-