Package com.fasterxml.jackson.annotation
Enum Nulls
- java.lang.Object
-
- java.lang.Enum<Nulls>
-
- com.fasterxml.jackson.annotation.Nulls
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Nulls>
public enum Nulls extends java.lang.Enum<Nulls>
Enumeration used withJsonSetter
(for properties `nulls` and `contentNulls`) to define how explicit `null` values from input (if input format has the concept; JSON, for example does) are handled.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AS_EMPTY
Value that indicates that value to assign should come from the value deserializer of the type, using methodgetEmptyValue()
.DEFAULT
Pseudo-value used to indicate that defaults are to be used for handling, that is, this value specifies no explicit handling override.FAIL
Value that indicates that an exception (of type that indicates input mismatch problem) is to be thrown, to indicate that null values are not accepted.SET
Value that indicates that an input null should result in assignment of Java `null` value of matching property (except where deserializer indicates other "null value" by overridinggetNullValue(...)
method)SKIP
Value that indicates that an input null value should be skipped and no assignment is to be made; this usually means that the property will have its default value.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Nulls
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Nulls[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SET
public static final Nulls SET
Value that indicates that an input null should result in assignment of Java `null` value of matching property (except where deserializer indicates other "null value" by overridinggetNullValue(...)
method)
-
SKIP
public static final Nulls SKIP
Value that indicates that an input null value should be skipped and no assignment is to be made; this usually means that the property will have its default value.
-
FAIL
public static final Nulls FAIL
Value that indicates that an exception (of type that indicates input mismatch problem) is to be thrown, to indicate that null values are not accepted.
-
AS_EMPTY
public static final Nulls AS_EMPTY
Value that indicates that value to assign should come from the value deserializer of the type, using methodgetEmptyValue()
.
-
DEFAULT
public static final Nulls DEFAULT
Pseudo-value used to indicate that defaults are to be used for handling, that is, this value specifies no explicit handling override.
-
-
Method Detail
-
values
public static Nulls[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Nulls c : Nulls.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Nulls valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-