Package com.fasterxml.jackson.annotation
Class JsonSetter.Value
java.lang.Object
com.fasterxml.jackson.annotation.JsonSetter.Value
- All Implemented Interfaces:
JacksonAnnotationValue<JsonSetter>
,Serializable
- Enclosing class:
- JsonSetter
public static class JsonSetter.Value
extends Object
implements JacksonAnnotationValue<JsonSetter>, Serializable
Helper class used to contain information from a single
JsonSetter
annotation, as well as to provide possible overrides from non-annotation sources.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final JsonSetter.Value
Default instance used in place of "default settings". -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonSetter.Value
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
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) int
hashCode()
static JsonSetter.Value
merge
(JsonSetter.Value base, JsonSetter.Value overrides) Helper method that will try to combine values from twoJsonSetter.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).Returns same asgetContentNulls()
unless value would beNulls.DEFAULT
in which case `null` is returned.Returns same asgetValueNulls()
unless value would beNulls.DEFAULT
in which case `null` is returned.protected Object
toString()
valueFor()
Introspection method that may be used to find actual annotation that may be used as the source for value instance.withContentNulls
(Nulls nulls) 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.withValueNulls
(Nulls nulls) withValueNulls
(Nulls valueNulls, Nulls contentNulls)
-
Field Details
-
EMPTY
Default instance used in place of "default settings".
-
-
Constructor Details
-
Value
-
-
Method Details
-
valueFor
Description copied from interface:JacksonAnnotationValue
Introspection method that may be used to find actual annotation that may be used as the source for value instance.- Specified by:
valueFor
in interfaceJacksonAnnotationValue<JsonSetter>
- Returns:
- Annotation class for which instances of this value class are created
-
readResolve
-
from
-
construct
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 byempty()
instance and using `withXxx`/`withoutXxx` methods, as this factory method may need to be changed if new properties are added inJsonIgnoreProperties
annotation. -
empty
Accessor for default instances which has "empty" settings; that is:- Null handling using global defaults,
Nulls.DEFAULT
.
- Null handling using global defaults,
-
merge
Helper method that will try to combine values from twoJsonSetter.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. -
forValueNulls
-
forValueNulls
-
forContentNulls
-
withOverrides
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 returnthis
instance; otherwise newJsonSetter.Value
with changed inclusion values. -
withValueNulls
-
withValueNulls
-
withContentNulls
-
getValueNulls
-
getContentNulls
-
nonDefaultValueNulls
Returns same asgetValueNulls()
unless value would beNulls.DEFAULT
in which case `null` is returned. -
nonDefaultContentNulls
Returns same asgetContentNulls()
unless value would beNulls.DEFAULT
in which case `null` is returned. -
toString
-
hashCode
public int hashCode() -
equals
-