Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.cfg

public final Enum CoercionAction

extends Enum<CoercionAction>
Class Inheritance
Imports
com.fasterxml.jackson.databind.type.LogicalType

Set of possible actions for requested coercion from an input shape CoercionInputShape that does not directly or naturally match target type (LogicalType). This action is suggestion for deserializers to use in cases where alternate actions could be appropriate: it is up to deserializer to check configured action and take it into consideration.
Since
2.12

Field Summary

Modifier and TypeField and Description
public static final CoercionAction
AsEmpty

Action to convert to "empty" value for type, whatever that is: for primitive types and their wrappers this is "default" value (for example, for int that would be 0); for java.util.Collections empty collection; for POJOs instance configured with default constructor and so on.

public static final CoercionAction
AsNull

Action to convert to null value

public static final CoercionAction
Fail

Action to fail coercion attempt with exceptipn

public static final CoercionAction
TryConvert

Action to attempt coercion (which may lead to failure)

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CoercionAction
public static CoercionAction[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AsEmptyback to summary
public static final CoercionAction AsEmpty

Action to convert to "empty" value for type, whatever that is: for primitive types and their wrappers this is "default" value (for example, for int that would be 0); for java.util.Collections empty collection; for POJOs instance configured with default constructor and so on.

AsNullback to summary
public static final CoercionAction AsNull

Action to convert to null value

Failback to summary
public static final CoercionAction Fail

Action to fail coercion attempt with exceptipn

TryConvertback to summary
public static final CoercionAction TryConvert

Action to attempt coercion (which may lead to failure)

Constructor Detail

CoercionActionback to summary
private CoercionAction()

Method Detail

valueOfback to summary
public static CoercionAction valueOf(String name)
valuesback to summary
public static CoercionAction[] values()