Package com.fasterxml.jackson.annotation
Class JsonInclude.Value
java.lang.Object
com.fasterxml.jackson.annotation.JsonInclude.Value
- All Implemented Interfaces:
JacksonAnnotationValue<JsonInclude>,Serializable
- Enclosing class:
- JsonInclude
public static class JsonInclude.Value
extends Object
implements JacksonAnnotationValue<JsonInclude>, Serializable
Helper class used to contain information from a single
JsonInclude
annotation.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Class<?>protected final JsonInclude.Includeprotected final Class<?>protected final JsonInclude.Includeprotected static final JsonInclude.Value -
Constructor Summary
ConstructorsModifierConstructorDescriptionValue(JsonInclude src) protectedValue(JsonInclude.Include vi, JsonInclude.Include ci, Class<?> valueFilter, Class<?> contentFilter) -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonInclude.Valueconstruct(JsonInclude.Include valueIncl, JsonInclude.Include contentIncl) Factory method to use for constructing an instance for componentsstatic JsonInclude.Valueconstruct(JsonInclude.Include valueIncl, JsonInclude.Include contentIncl, Class<?> valueFilter, Class<?> contentFilter) Factory method to use for constructing an instance for componentsstatic JsonInclude.Valueempty()booleanstatic JsonInclude.Valuefrom(JsonInclude src) Factory method to use for constructing an instance from instance ofJsonIncludeClass<?>Class<?>inthashCode()static JsonInclude.Valuemerge(JsonInclude.Value base, JsonInclude.Value overrides) Helper method that will try to combine values from twoJsonInclude.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 JsonInclude.ValuemergeAll(JsonInclude.Value... values) protected ObjecttoString()valueFor()Introspection method that may be used to find actual annotation that may be used as the source for value instance.withContentFilter(Class<?> filter) Mutant factory that will either SetcontentasUSE_DEFAULTSandcontentFiltertofilter(if filter not null); or SetcontentasALWAYS(if filter null)withOverrides(JsonInclude.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.withValueFilter(Class<?> filter) Mutant factory that will either SetvalueasUSE_DEFAULTSandvalueFiltertofilter(if filter not null); or SetvalueasALWAYS(if filter null)
-
Field Details
-
EMPTY
-
_valueInclusion
-
_contentInclusion
-
_valueFilter
-
_contentFilter
-
-
Constructor Details
-
Value
-
Value
protected Value(JsonInclude.Include vi, JsonInclude.Include ci, Class<?> valueFilter, Class<?> contentFilter)
-
-
Method Details
-
empty
-
merge
Helper method that will try to combine values from twoJsonInclude.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
-
readResolve
-
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 returnthisinstance; otherwise newJsonInclude.Valuewith changed inclusion values. -
construct
public static JsonInclude.Value construct(JsonInclude.Include valueIncl, JsonInclude.Include contentIncl) Factory method to use for constructing an instance for components -
construct
public static JsonInclude.Value construct(JsonInclude.Include valueIncl, JsonInclude.Include contentIncl, Class<?> valueFilter, Class<?> contentFilter) Factory method to use for constructing an instance for components -
from
Factory method to use for constructing an instance from instance ofJsonInclude -
withValueInclusion
-
withValueFilter
Mutant factory that will either- Set
valueasUSE_DEFAULTSandvalueFiltertofilter(if filter not null); or - Set
valueasALWAYS(if filter null)
- Set
-
withContentFilter
Mutant factory that will either- Set
contentasUSE_DEFAULTSandcontentFiltertofilter(if filter not null); or - Set
contentasALWAYS(if filter null)
- Set
-
withContentInclusion
-
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<JsonInclude>- Returns:
- Annotation class for which instances of this value class are created
-
getValueInclusion
-
getContentInclusion
-
getValueFilter
-
getContentFilter
-
toString
-
hashCode
public int hashCode() -
equals
-