Package com.fasterxml.jackson.annotation
Class JsonIncludeProperties.Value
- java.lang.Object
-
- com.fasterxml.jackson.annotation.JsonIncludeProperties.Value
-
- All Implemented Interfaces:
JacksonAnnotationValue<JsonIncludeProperties>,java.io.Serializable
- Enclosing class:
- JsonIncludeProperties
public static class JsonIncludeProperties.Value extends java.lang.Object implements JacksonAnnotationValue<JsonIncludeProperties>, java.io.Serializable
Helper class used to contain information from a singleJsonIncludePropertiesannotation, as well as to provide possible overrides from non-annotation sources.- Since:
- 2.12
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.String>_includedName of the properties to include.protected static JsonIncludeProperties.ValueALLDefault instance has no explicitly included fieldsprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description protectedValue(java.util.Set<java.lang.String> included)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.Set<java.lang.String>_asSet(java.lang.String[] v)private static boolean_equals(java.util.Set<java.lang.String> a, java.util.Set<java.lang.String> b)static JsonIncludeProperties.Valueall()booleanequals(java.lang.Object o)static JsonIncludeProperties.Valuefrom(JsonIncludeProperties src)java.util.Set<java.lang.String>getIncluded()inthashCode()java.lang.StringtoString()java.lang.Class<JsonIncludeProperties>valueFor()Introspection method that may be used to find actual annotation that may be used as the source for value instance.JsonIncludeProperties.ValuewithOverrides(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.Values do not count ("undefined" meaning thatgetIncluded()returnsnull).
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
ALL
protected static final JsonIncludeProperties.Value ALL
Default instance has no explicitly included fields
-
_included
protected final java.util.Set<java.lang.String> _included
Name of the properties to include. Null means that all properties are included, empty means none.
-
-
Method Detail
-
from
public static JsonIncludeProperties.Value from(JsonIncludeProperties src)
-
all
public static JsonIncludeProperties.Value all()
-
valueFor
public java.lang.Class<JsonIncludeProperties> 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<JsonIncludeProperties>- Returns:
- Annotation class for which instances of this value class are created
-
getIncluded
public java.util.Set<java.lang.String> getIncluded()
- Returns:
- Names included, if any, possibly empty;
nullfor "not defined"
-
withOverrides
public JsonIncludeProperties.Value 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.Values do not count ("undefined" meaning thatgetIncluded()returnsnull). So: overriding with "undefined" returns originalValueas-is; overriding an "undefined"Valuereturns overrideValueas-is.
-
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
-
_equals
private static boolean _equals(java.util.Set<java.lang.String> a, java.util.Set<java.lang.String> b)
-
_asSet
private static java.util.Set<java.lang.String> _asSet(java.lang.String[] v)
-
-