• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.fasterxml.jackson.annotation;
2 
3 /**
4  * Enumeration used with {@link JsonSetter} (for properties `nulls`
5  * and `contentNulls`)
6  * to define how explicit `null` values from input (if input format
7  * has the concept; JSON, for example does) are handled.
8  */
9 public enum Nulls
10 {
11     /**
12      * Value that indicates that an input null should result in assignment
13      * of Java `null` value of matching property (except where deserializer
14      * indicates other "null value" by overriding <code>getNullValue(...)</code>
15      * method)
16      */
17     SET,
18 
19     /**
20      * Value that indicates that an input null value should be skipped and
21      * no assignment is to be made; this usually means that the property
22      * will have its default value.
23      */
24     SKIP,
25 
26     /**
27      * Value that indicates that an exception (of type that indicates input mismatch
28      * problem) is to be thrown, to indicate that null values are not accepted.
29      */
30     FAIL,
31 
32     /**
33      * Value that indicates that value to assign should come from the value
34      * deserializer of the type, using method <code>getEmptyValue()</code>.
35      */
36     AS_EMPTY,
37 
38     /**
39      * Pseudo-value used to indicate that defaults are to be used for handling,
40      * that is, this value specifies no explicit handling override.
41      */
42     DEFAULT
43     ;
44 }