Package com.fasterxml.jackson.annotation
Class JsonIncludeProperties.Value
java.lang.Object
com.fasterxml.jackson.annotation.JsonIncludeProperties.Value
- All Implemented Interfaces:
JacksonAnnotationValue<JsonIncludeProperties>
,Serializable
- Enclosing class:
- JsonIncludeProperties
public static class JsonIncludeProperties.Value
extends Object
implements JacksonAnnotationValue<JsonIncludeProperties>, Serializable
Helper class used to contain information from a single
JsonIncludeProperties
annotation, as well as to provide possible overrides from non-annotation sources.- Since:
- 2.12
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionName of the properties to include.protected static final JsonIncludeProperties.Value
Default instance has no explicitly included fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonIncludeProperties.Value
all()
boolean
static JsonIncludeProperties.Value
int
hashCode()
toString()
valueFor()
Introspection method that may be used to find actual annotation that may be used as the source for value instance.withOverrides
(JsonIncludeProperties.Value overrides) Mutant factory method to override the current value with an another, merging the included fields so that only entries that exist in both original and override set are included, taking into account that "undefined"JsonIncludeProperties.Value
s do not count ("undefined" meaning thatgetIncluded()
returnsnull
).
-
Field Details
-
ALL
Default instance has no explicitly included fields -
_included
Name of the properties to include. Null means that all properties are included, empty means none.
-
-
Constructor Details
-
Value
-
-
Method Details
-
from
-
all
-
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<JsonIncludeProperties>
- Returns:
- Annotation class for which instances of this value class are created
-
getIncluded
- Returns:
- Names included, if any, possibly empty;
null
for "not defined"
-
withOverrides
Mutant factory method to override the current value with an another, merging the included fields so that only entries that exist in both original and override set are included, taking into account that "undefined"JsonIncludeProperties.Value
s do not count ("undefined" meaning thatgetIncluded()
returnsnull
). So: overriding with "undefined" returns originalValue
as-is; overriding an "undefined"Value
returns overrideValue
as-is. -
toString
-
hashCode
public int hashCode() -
equals
-