com.fasterxml.jackson.databind.cfg

## Class CoercionConfigs

- java.lang.Object
- - com.fasterxml.jackson.databind.cfg.CoercionConfigs

All Implemented Interfaces:
  Serializable

    public class CoercionConfigs
    extends Object
    implements Serializable

Since:
  2.12
See Also:
  Serialized Form

### Field Summary

Fields
`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`)

### Constructor Summary

Constructors
`` `CoercionConfigs()`
`protected` `CoercionConfigs(CoercionAction defaultAction, MutableCoercionConfig defaultCoercions, MutableCoercionConfig[] perTypeCoercions, Map<Class<?>,MutableCoercionConfig> perClassCoercions)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### _defaultAction

    protected CoercionAction _defaultAction

Global default for cases not explicitly covered

#### _defaultCoercions

    protected final MutableCoercionConfig _defaultCoercions

Default coercion definitions used if no overrides found by logical or physical type.

#### _perTypeCoercions

    protected MutableCoercionConfig[] _perTypeCoercions

Coercion definitions by logical type (`LogicalType`)

#### _perClassCoercions

    protected Map<Class<?>,MutableCoercionConfig> _perClassCoercions

Coercion definitions by physical type (Class).

### Constructor Detail

#### CoercionConfigs

    public CoercionConfigs()

#### CoercionConfigs

    protected CoercionConfigs(CoercionAction defaultAction,
                              MutableCoercionConfig defaultCoercions,
                              MutableCoercionConfig[] perTypeCoercions,
                              Map<Class<?>,MutableCoercionConfig> perClassCoercions)

### Method Detail

#### copy

    public CoercionConfigs copy()

Method called to create a non-shared copy of configuration settings, to be used by another `ObjectMapper` instance.

Returns:
  A non-shared copy of configuration settings

#### defaultCoercions

    public MutableCoercionConfig defaultCoercions()

#### findOrCreateCoercion

    public MutableCoercionConfig findOrCreateCoercion(LogicalType type)

#### findOrCreateCoercion

    public MutableCoercionConfig findOrCreateCoercion(Class<?> type)

#### 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 configuration
  `targetType` - Logical target type of coercion
  `targetClass` - Physical target type of coercion
  `inputShape` - Input shape to coerce from
Returns:
  CoercionAction configured for specified coercion
Since:
  2.12

#### 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, returns `actionIfBlankNotAllowed`, otherwise returns action for `CoercionInputShape.EmptyString`.

Parameters:
  `config` - Currently active deserialization configuration
  `targetType` - Logical target type of coercion
  `targetClass` - Physical target type of coercion
  `actionIfBlankNotAllowed` - Return value to use in case "blanks as empty" is not allowed
Returns:
  CoercionAction configured for specified coercion from blank string

#### _isScalarType

    protected boolean _isScalarType(LogicalType targetType)