Package com.fasterxml.jackson.annotation
Class JsonIgnoreProperties.Value
- java.lang.Object
 - 
- com.fasterxml.jackson.annotation.JsonIgnoreProperties.Value
 
 
- 
- All Implemented Interfaces:
 JacksonAnnotationValue<JsonIgnoreProperties>,java.io.Serializable
- Enclosing class:
 - JsonIgnoreProperties
 
public static class JsonIgnoreProperties.Value extends java.lang.Object implements JacksonAnnotationValue<JsonIgnoreProperties>, java.io.Serializable
Helper class used to contain information from a singleJsonIgnorePropertiesannotation, as well as to provide possible overrides from non-annotation sources.- Since:
 - 2.8
 - See Also:
 - Serialized Form
 
 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonIgnoreProperties.Valueconstruct(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.Valueempty()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)booleanequals(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 asgetIgnored()ifgetAllowSetters()is false (that is, there is "allowSetters=false" or equivalent), otherwise returns emptySet.java.util.Set<java.lang.String>findIgnoredForSerialization()Method called to find names of properties to ignore when used for serialization: functionally same asgetIgnored()ifgetAllowGetters()is false (that is, there is "allowGetters=false" or equivalent), otherwise returns emptySet.static JsonIgnoreProperties.ValueforIgnoredProperties(java.lang.String... propNames)static JsonIgnoreProperties.ValueforIgnoredProperties(java.util.Set<java.lang.String> propNames)static JsonIgnoreProperties.ValueforIgnoreUnknown(boolean state)static JsonIgnoreProperties.Valuefrom(JsonIgnoreProperties src)booleangetAllowGetters()booleangetAllowSetters()java.util.Set<java.lang.String>getIgnored()booleangetIgnoreUnknown()booleangetMerge()inthashCode()static JsonIgnoreProperties.Valuemerge(JsonIgnoreProperties.Value base, JsonIgnoreProperties.Value overrides)Helper method that will try to combine values from twoJsonIgnoreProperties.Valueinstances, 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.ValuemergeAll(JsonIgnoreProperties.Value... values)java.lang.StringtoString()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.ValuewithAllowGetters()JsonIgnoreProperties.ValuewithAllowSetters()JsonIgnoreProperties.ValuewithIgnored(java.lang.String... ignored)JsonIgnoreProperties.ValuewithIgnored(java.util.Set<java.lang.String> ignored)JsonIgnoreProperties.ValuewithIgnoreUnknown()JsonIgnoreProperties.ValuewithMerge()JsonIgnoreProperties.ValuewithoutAllowGetters()JsonIgnoreProperties.ValuewithoutAllowSetters()JsonIgnoreProperties.ValuewithoutIgnored()JsonIgnoreProperties.ValuewithoutIgnoreUnknown()JsonIgnoreProperties.ValuewithoutMerge()JsonIgnoreProperties.ValuewithOverrides(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. 
 - 
 
- 
- 
Method Detail
- 
from
public static JsonIgnoreProperties.Value from(JsonIgnoreProperties src)
 
- 
construct
public 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. Most users would be better of starting byempty()instance and using `withXxx()`/`withoutXxx()` methods, as this factory method may need to be changed if new properties are added inJsonIgnorePropertiesannotation. 
- 
empty
public 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)
 
 
- 
merge
public static JsonIgnoreProperties.Value merge(JsonIgnoreProperties.Value base, JsonIgnoreProperties.Value overrides)
Helper method that will try to combine values from twoJsonIgnoreProperties.Valueinstances, 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. 
- 
mergeAll
public static JsonIgnoreProperties.Value mergeAll(JsonIgnoreProperties.Value... values)
- Since:
 - 2.8
 
 
- 
forIgnoredProperties
public static JsonIgnoreProperties.Value forIgnoredProperties(java.util.Set<java.lang.String> propNames)
 
- 
forIgnoredProperties
public static JsonIgnoreProperties.Value forIgnoredProperties(java.lang.String... propNames)
 
- 
forIgnoreUnknown
public static JsonIgnoreProperties.Value forIgnoreUnknown(boolean state)
 
- 
withOverrides
public 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. If no overrides exist will returnthisinstance; otherwise newJsonIgnoreProperties.Valuewith changed inclusion values. 
- 
withIgnored
public JsonIgnoreProperties.Value withIgnored(java.util.Set<java.lang.String> ignored)
 
- 
withIgnored
public JsonIgnoreProperties.Value withIgnored(java.lang.String... ignored)
 
- 
withoutIgnored
public JsonIgnoreProperties.Value withoutIgnored()
 
- 
withIgnoreUnknown
public JsonIgnoreProperties.Value withIgnoreUnknown()
 
- 
withoutIgnoreUnknown
public JsonIgnoreProperties.Value withoutIgnoreUnknown()
 
- 
withAllowGetters
public JsonIgnoreProperties.Value withAllowGetters()
 
- 
withoutAllowGetters
public JsonIgnoreProperties.Value withoutAllowGetters()
 
- 
withAllowSetters
public JsonIgnoreProperties.Value withAllowSetters()
 
- 
withoutAllowSetters
public JsonIgnoreProperties.Value withoutAllowSetters()
 
- 
withMerge
public JsonIgnoreProperties.Value withMerge()
 
- 
withoutMerge
public JsonIgnoreProperties.Value withoutMerge()
 
- 
valueFor
public java.lang.Class<JsonIgnoreProperties> valueFor()
Description copied from interface:JacksonAnnotationValueIntrospection method that may be used to find actual annotation that may be used as the source for value instance.- Specified by:
 valueForin interfaceJacksonAnnotationValue<JsonIgnoreProperties>- Returns:
 - Annotation class for which instances of this value class are created
 
 
- 
getIgnored
public java.util.Set<java.lang.String> getIgnored()
 
- 
findIgnoredForSerialization
public java.util.Set<java.lang.String> findIgnoredForSerialization()
Method called to find names of properties to ignore when used for serialization: functionally same asgetIgnored()ifgetAllowGetters()is false (that is, there is "allowGetters=false" or equivalent), otherwise returns emptySet. 
- 
findIgnoredForDeserialization
public java.util.Set<java.lang.String> findIgnoredForDeserialization()
Method called to find names of properties to ignore when used for serialization: functionally same asgetIgnored()ifgetAllowSetters()is false (that is, there is "allowSetters=false" or equivalent), otherwise returns emptySet. 
- 
getIgnoreUnknown
public boolean getIgnoreUnknown()
 
- 
getAllowGetters
public boolean getAllowGetters()
 
- 
getAllowSetters
public boolean getAllowSetters()
 
- 
getMerge
public boolean getMerge()
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object o)
- Overrides:
 equalsin classjava.lang.Object
 
 - 
 
 -