JsonProperty annotation;
or (as of 2.9 and later), specify additional aspects of the
assigning property a value during serialization.
| Modifier and Type | Class and Description |
|---|---|
| public static class | JsonSetter.
Helper class used to contain information from a single |
| Modifier and Type | Method and Description |
|---|---|
| public Nulls | contentNulls()
Specifies action to take when input to match into content value
(of a |
| public Nulls | |
| public String | value()
Optional default argument that defines logical property this method is used to modify ("set"); this is the property name used in JSON content. |
| contentNulls | back to summary |
|---|---|
| public Nulls contentNulls() Specifies action to take when input to match into content value
(of a | |
| nulls | back to summary |
|---|---|
| public Nulls nulls() Specifies action to take when input contains explicit `null` value
(if format has one).
Default action, in absence of any explicit configuration,
is usually Note is not usually used in case property value is missing, unless data format specifies that there is defaulting which would result in an explicit null assignment. | |
| value | back to summary |
|---|---|
| public String value() Optional default argument that defines logical property this method is used to modify ("set"); this is the property name used in JSON content. | |
JsonSetter
annotation, as well as to provide possible overrides from non-annotation sources.
| Modifier and Type | Field and Description |
|---|---|
| private final Nulls | |
| private final Nulls | |
| protected static final JsonSetter. | EMPTY
Default instance used in place of "default settings". |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | |
| public static JsonSetter. | |
| public static JsonSetter. | empty()
Accessor for default instances which has "empty" settings; that is:
|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public static JsonSetter. | |
| public static JsonSetter. | |
| public static JsonSetter. | |
| public static JsonSetter. | |
| public Nulls | |
| public Nulls | |
| public int | |
| public static JsonSetter. | merge(JsonSetter.
Helper method that will try to combine values from two |
| public Nulls | nonDefaultContentNulls()
Returns same as |
| public Nulls | nonDefaultValueNulls()
Returns same as |
| protected Object | |
| public String | |
| public Class | valueFor()
Implements com. Introspection method that may be used to find actual annotation that may be used as the source for value instance. |
| public JsonSetter. | |
| public JsonSetter. | withOverrides(JsonSetter.
Mutant factory method that merges values of this value with given override values, so that any explicitly defined inclusion in overrides has precedence over settings of this value instance. |
| public JsonSetter. | |
| public JsonSetter. |
| _contentNulls | back to summary |
|---|---|
| private final Nulls _contentNulls | |
| _nulls | back to summary |
|---|---|
| private final Nulls _nulls | |
| EMPTY | back to summary |
|---|---|
| protected static final JsonSetter. Default instance used in place of "default settings". | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Value | back to summary |
|---|---|
| protected Value(Nulls nulls, Nulls contentNulls) | |
| _empty | back to summary |
|---|---|
| private static boolean _empty(Nulls nulls, Nulls contentNulls) | |
| construct | back to summary |
|---|---|
| public static JsonSetter. Factory method that may be used (although is NOT the recommended way)
to construct an instance from a full set of properties. Most users would
be better off starting by | |
| empty | back to summary |
|---|---|
| public static JsonSetter. Accessor for default instances which has "empty" settings; that is:
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| forContentNulls | back to summary |
|---|---|
| public static JsonSetter. | |
| forValueNulls | back to summary |
|---|---|
| public static JsonSetter. | |
| forValueNulls | back to summary |
|---|---|
| public static JsonSetter. | |
| from | back to summary |
|---|---|
| public static JsonSetter. | |
| getContentNulls | back to summary |
|---|---|
| public Nulls getContentNulls() | |
| getValueNulls | back to summary |
|---|---|
| public Nulls getValueNulls() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| merge | back to summary |
|---|---|
| public static JsonSetter. Helper method that will try to combine values from two | |
| nonDefaultContentNulls | back to summary |
|---|---|
| public Nulls nonDefaultContentNulls() Returns same as | |
| nonDefaultValueNulls | back to summary |
|---|---|
| public Nulls nonDefaultValueNulls() Returns same as | |
| readResolve | back to summary |
|---|---|
| protected Object readResolve() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| valueFor | back to summary |
|---|---|
| public Class Implements com. Doc from com. Introspection method that may be used to find actual annotation that may be used as the source for value instance.
| |
| withContentNulls | back to summary |
|---|---|
| public JsonSetter. | |
| withOverrides | back to summary |
|---|---|
| public JsonSetter. Mutant factory method that merges values of this value with given override
values, so that any explicitly defined inclusion in overrides has precedence over
settings of this value instance. If no overrides exist will return | |
| withValueNulls | back to summary |
|---|---|
| public JsonSetter. | |
| withValueNulls | back to summary |
|---|---|
| public JsonSetter. | |