public static class JsonSetter.Value extends Object implements JacksonAnnotationValue<JsonSetter>, Serializable
JsonSetter
annotation, as well as to provide possible overrides from non-annotation sources.Modifier and Type | Field and Description |
---|---|
protected static JsonSetter.Value |
EMPTY
Default instance used in place of "default settings".
|
Modifier | Constructor and Description |
---|---|
protected |
Value(Nulls nulls,
Nulls contentNulls) |
Modifier and Type | Method and Description |
---|---|
static JsonSetter.Value |
construct(Nulls nulls,
Nulls contentNulls)
Factory method that may be used (although is NOT the recommended way)
to construct an instance from a full set of properties.
|
static JsonSetter.Value |
empty()
Accessor for default instances which has "empty" settings; that is:
Null handling using global defaults,
Nulls.DEFAULT . |
boolean |
equals(Object o) |
static JsonSetter.Value |
forContentNulls(Nulls nulls) |
static JsonSetter.Value |
forValueNulls(Nulls nulls) |
static JsonSetter.Value |
forValueNulls(Nulls nulls,
Nulls contentNulls) |
static JsonSetter.Value |
from(JsonSetter src) |
Nulls |
getContentNulls() |
Nulls |
getValueNulls() |
int |
hashCode() |
static JsonSetter.Value |
merge(JsonSetter.Value base,
JsonSetter.Value overrides)
Helper method that will try to combine values from two
JsonSetter.Value
instances, using one as base settings, and the other as overrides
to use instead of base values when defined; base values are only
use if override does not specify a value (matching value is null
or logically missing). |
Nulls |
nonDefaultContentNulls()
Returns same as
getContentNulls() unless value would be
Nulls.DEFAULT in which case `null` is returned. |
Nulls |
nonDefaultValueNulls()
Returns same as
getValueNulls() unless value would be
Nulls.DEFAULT in which case `null` is returned. |
protected Object |
readResolve() |
String |
toString() |
Class<JsonSetter> |
valueFor()
Introspection method that may be used to find actual annotation that may be used
as the source for value instance.
|
JsonSetter.Value |
withContentNulls(Nulls nulls) |
JsonSetter.Value |
withOverrides(JsonSetter.Value overrides)
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.
|
JsonSetter.Value |
withValueNulls(Nulls nulls) |
JsonSetter.Value |
withValueNulls(Nulls valueNulls,
Nulls contentNulls) |
protected static final JsonSetter.Value EMPTY
public Class<JsonSetter> valueFor()
JacksonAnnotationValue
valueFor
in interface JacksonAnnotationValue<JsonSetter>
protected Object readResolve()
public static JsonSetter.Value from(JsonSetter src)
public static JsonSetter.Value construct(Nulls nulls, Nulls contentNulls)
empty()
instance and using `withXxx`/`withoutXxx`
methods, as this factory method may need to be changed if new properties
are added in JsonIgnoreProperties
annotation.public static JsonSetter.Value empty()
Nulls.DEFAULT
.
public static JsonSetter.Value merge(JsonSetter.Value base, JsonSetter.Value overrides)
JsonSetter.Value
instances, using one as base settings, and the other as overrides
to use instead of base values when defined; base values are only
use if override does not specify a value (matching value is null
or logically missing).
Note that one or both of value instances may be `null`, directly;
if both are `null`, result will also be `null`; otherwise never null.public static JsonSetter.Value forValueNulls(Nulls nulls)
public static JsonSetter.Value forValueNulls(Nulls nulls, Nulls contentNulls)
public static JsonSetter.Value forContentNulls(Nulls nulls)
public JsonSetter.Value withOverrides(JsonSetter.Value overrides)
this
instance; otherwise new JsonSetter.Value
with changed inclusion values.public JsonSetter.Value withValueNulls(Nulls nulls)
public JsonSetter.Value withValueNulls(Nulls valueNulls, Nulls contentNulls)
public JsonSetter.Value withContentNulls(Nulls nulls)
public Nulls getValueNulls()
public Nulls getContentNulls()
public Nulls nonDefaultValueNulls()
getValueNulls()
unless value would be
Nulls.DEFAULT
in which case `null` is returned.public Nulls nonDefaultContentNulls()
getContentNulls()
unless value would be
Nulls.DEFAULT
in which case `null` is returned.Copyright © 2008–2024 FasterXML. All rights reserved.