public class CoercionConfigs extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected CoercionAction |
_defaultAction
Global default for cases not explicitly covered
|
protected MutableCoercionConfig |
_defaultCoercions
Default coercion definitions used if no overrides found
by logical or physical type.
|
protected Map<Class<?>,MutableCoercionConfig> |
_perClassCoercions
Coercion definitions by physical type (Class).
|
protected MutableCoercionConfig[] |
_perTypeCoercions
Coercion definitions by logical type (
LogicalType ) |
Modifier | Constructor and Description |
---|---|
|
CoercionConfigs() |
protected |
CoercionConfigs(CoercionAction defaultAction,
MutableCoercionConfig defaultCoercions,
MutableCoercionConfig[] perTypeCoercions,
Map<Class<?>,MutableCoercionConfig> perClassCoercions) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_isScalarType(LogicalType targetType) |
CoercionConfigs |
copy()
Method called to create a non-shared copy of configuration settings,
to be used by another
ObjectMapper
instance. |
MutableCoercionConfig |
defaultCoercions() |
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.
|
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).
|
MutableCoercionConfig |
findOrCreateCoercion(Class<?> type) |
MutableCoercionConfig |
findOrCreateCoercion(LogicalType type) |
protected CoercionAction _defaultAction
protected final MutableCoercionConfig _defaultCoercions
protected MutableCoercionConfig[] _perTypeCoercions
LogicalType
)protected Map<Class<?>,MutableCoercionConfig> _perClassCoercions
public CoercionConfigs()
protected CoercionConfigs(CoercionAction defaultAction, MutableCoercionConfig defaultCoercions, MutableCoercionConfig[] perTypeCoercions, Map<Class<?>,MutableCoercionConfig> perClassCoercions)
public CoercionConfigs copy()
ObjectMapper
instance.public MutableCoercionConfig defaultCoercions()
public MutableCoercionConfig findOrCreateCoercion(LogicalType type)
public MutableCoercionConfig findOrCreateCoercion(Class<?> type)
public CoercionAction findCoercion(DeserializationConfig config, LogicalType targetType, Class<?> targetClass, CoercionInputShape inputShape)
config
- Currently active deserialization configurationtargetType
- Logical target type of coerciontargetClass
- Physical target type of coercioninputShape
- Input shape to coerce frompublic CoercionAction findCoercionFromBlankString(DeserializationConfig config, LogicalType targetType, Class<?> targetClass, CoercionAction actionIfBlankNotAllowed)
actionIfBlankNotAllowed
, otherwise returns action for
CoercionInputShape.EmptyString
.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 allowedprotected boolean _isScalarType(LogicalType targetType)
Copyright © 2008–2024 FasterXML. All rights reserved.