Enum Class CoercionAction
java.lang.Object
java.lang.Enum<CoercionAction>
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.cfg.CoercionAction
- All Implemented Interfaces:
Serializable
,Comparable<CoercionAction>
,java.lang.constant.Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAction to convert to "empty" value for type, whatever that is: for primitive types and their wrappers this is "default" value (for example, forint
that would be0
); forCollection
s empty collection; for POJOs instance configured with default constructor and so on.Action to convert tonull
valueAction to fail coercion attempt with exceptipnAction to attempt coercion (which may lead to failure) -
Method Summary
Modifier and TypeMethodDescriptionstatic CoercionAction
Returns the enum constant of this class with the specified name.static CoercionAction[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Fail
Action to fail coercion attempt with exceptipn -
TryConvert
Action to attempt coercion (which may lead to failure) -
AsNull
Action to convert tonull
value -
AsEmpty
Action to convert to "empty" value for type, whatever that is: for primitive types and their wrappers this is "default" value (for example, forint
that would be0
); forCollection
s empty collection; for POJOs instance configured with default constructor and so on.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-