public static class JsonIgnoreProperties.Value extends java.lang.Object implements JacksonAnnotationValue<JsonIgnoreProperties>, java.io.Serializable
JsonIgnoreProperties
annotation, as well as to provide possible overrides from non-annotation sources.Modifier and Type | Method and Description |
---|---|
static JsonIgnoreProperties.Value |
construct(java.util.Set<java.lang.String> ignored,
boolean ignoreUnknown,
boolean allowGetters,
boolean allowSetters,
boolean merge)
Factory method that may be used (although is NOT the recommended way)
to construct an instance from a full set of properties.
|
static JsonIgnoreProperties.Value |
empty()
Accessor for default instances which has "empty" settings; that is:
No explicitly defined fields to ignore
Does not ignore unknown fields
Does not "allow" getters if property ignored (that is, ignorals apply to both setter and getter)
Does not "allow" setters if property ignored (that is, ignorals apply to both setter and getter)
Does use merge when combining overrides to base settings, such that `true` settings
for any of the properties results in `true`, and names of fields are combined (union)
|
boolean |
equals(java.lang.Object o) |
java.util.Set<java.lang.String> |
findIgnoredForDeserialization()
Method called to find names of properties to ignore when used for
serialization: functionally
same as
getIgnored() if getAllowSetters() is false
(that is, there is "allowSetters=false" or equivalent),
otherwise returns empty Set . |
java.util.Set<java.lang.String> |
findIgnoredForSerialization()
Method called to find names of properties to ignore when used for
serialization: functionally
same as
getIgnored() if getAllowGetters() is false
(that is, there is "allowGetters=false" or equivalent),
otherwise returns empty Set . |
static JsonIgnoreProperties.Value |
forIgnoredProperties(java.util.Set<java.lang.String> propNames) |
static JsonIgnoreProperties.Value |
forIgnoredProperties(java.lang.String... propNames) |
static JsonIgnoreProperties.Value |
forIgnoreUnknown(boolean state) |
static JsonIgnoreProperties.Value |
from(JsonIgnoreProperties src) |
boolean |
getAllowGetters() |
boolean |
getAllowSetters() |
java.util.Set<java.lang.String> |
getIgnored() |
boolean |
getIgnoreUnknown() |
boolean |
getMerge() |
int |
hashCode() |
static JsonIgnoreProperties.Value |
merge(JsonIgnoreProperties.Value base,
JsonIgnoreProperties.Value overrides)
Helper method that will try to combine values from two
JsonIgnoreProperties.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). |
static JsonIgnoreProperties.Value |
mergeAll(JsonIgnoreProperties.Value... values) |
java.lang.String |
toString() |
java.lang.Class<JsonIgnoreProperties> |
valueFor()
Introspection method that may be used to find actual annotation that may be used
as the source for value instance.
|
JsonIgnoreProperties.Value |
withAllowGetters() |
JsonIgnoreProperties.Value |
withAllowSetters() |
JsonIgnoreProperties.Value |
withIgnored(java.util.Set<java.lang.String> ignored) |
JsonIgnoreProperties.Value |
withIgnored(java.lang.String... ignored) |
JsonIgnoreProperties.Value |
withIgnoreUnknown() |
JsonIgnoreProperties.Value |
withMerge() |
JsonIgnoreProperties.Value |
withoutAllowGetters() |
JsonIgnoreProperties.Value |
withoutAllowSetters() |
JsonIgnoreProperties.Value |
withoutIgnored() |
JsonIgnoreProperties.Value |
withoutIgnoreUnknown() |
JsonIgnoreProperties.Value |
withoutMerge() |
JsonIgnoreProperties.Value |
withOverrides(JsonIgnoreProperties.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.
|
public static JsonIgnoreProperties.Value from(JsonIgnoreProperties src)
public static JsonIgnoreProperties.Value construct(java.util.Set<java.lang.String> ignored, boolean ignoreUnknown, boolean allowGetters, boolean allowSetters, boolean merge)
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 JsonIgnoreProperties.Value empty()
public static JsonIgnoreProperties.Value merge(JsonIgnoreProperties.Value base, JsonIgnoreProperties.Value overrides)
JsonIgnoreProperties.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 JsonIgnoreProperties.Value mergeAll(JsonIgnoreProperties.Value... values)
public static JsonIgnoreProperties.Value forIgnoredProperties(java.util.Set<java.lang.String> propNames)
public static JsonIgnoreProperties.Value forIgnoredProperties(java.lang.String... propNames)
public static JsonIgnoreProperties.Value forIgnoreUnknown(boolean state)
public JsonIgnoreProperties.Value withOverrides(JsonIgnoreProperties.Value overrides)
this
instance; otherwise new JsonIgnoreProperties.Value
with changed inclusion values.public JsonIgnoreProperties.Value withIgnored(java.util.Set<java.lang.String> ignored)
public JsonIgnoreProperties.Value withIgnored(java.lang.String... ignored)
public JsonIgnoreProperties.Value withoutIgnored()
public JsonIgnoreProperties.Value withIgnoreUnknown()
public JsonIgnoreProperties.Value withoutIgnoreUnknown()
public JsonIgnoreProperties.Value withAllowGetters()
public JsonIgnoreProperties.Value withoutAllowGetters()
public JsonIgnoreProperties.Value withAllowSetters()
public JsonIgnoreProperties.Value withoutAllowSetters()
public JsonIgnoreProperties.Value withMerge()
public JsonIgnoreProperties.Value withoutMerge()
public java.lang.Class<JsonIgnoreProperties> valueFor()
JacksonAnnotationValue
valueFor
in interface JacksonAnnotationValue<JsonIgnoreProperties>
public java.util.Set<java.lang.String> getIgnored()
public java.util.Set<java.lang.String> findIgnoredForSerialization()
getIgnored()
if getAllowGetters()
is false
(that is, there is "allowGetters=false" or equivalent),
otherwise returns empty Set
.public java.util.Set<java.lang.String> findIgnoredForDeserialization()
getIgnored()
if getAllowSetters()
is false
(that is, there is "allowSetters=false" or equivalent),
otherwise returns empty Set
.public boolean getIgnoreUnknown()
public boolean getAllowGetters()
public boolean getAllowSetters()
public boolean getMerge()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"