Package com.fasterxml.jackson.annotation
Class JsonTypeInfo.Value
- java.lang.Object
-
- com.fasterxml.jackson.annotation.JsonTypeInfo.Value
-
- All Implemented Interfaces:
JacksonAnnotationValue<JsonTypeInfo>
,java.io.Serializable
- Enclosing class:
- JsonTypeInfo
public static class JsonTypeInfo.Value extends java.lang.Object implements JacksonAnnotationValue<JsonTypeInfo>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<?>
_defaultImpl
protected JsonTypeInfo.Id
_idType
protected boolean
_idVisible
protected JsonTypeInfo.As
_inclusionType
protected java.lang.String
_propertyName
protected java.lang.Boolean
_requireTypeIdForSubtypes
protected static JsonTypeInfo.Value
EMPTY
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description protected
Value(JsonTypeInfo.Id idType, JsonTypeInfo.As inclusionType, java.lang.String propertyName, java.lang.Class<?> defaultImpl, boolean idVisible, java.lang.Boolean requireTypeIdForSubtypes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <T> boolean
_equal(T value1, T value2)
private static boolean
_equals(JsonTypeInfo.Value a, JsonTypeInfo.Value b)
static JsonTypeInfo.Value
construct(JsonTypeInfo.Id idType, JsonTypeInfo.As inclusionType, java.lang.String propertyName, java.lang.Class<?> defaultImpl, boolean idVisible, java.lang.Boolean requireTypeIdForSubtypes)
boolean
equals(java.lang.Object o)
static JsonTypeInfo.Value
from(JsonTypeInfo src)
java.lang.Class<?>
getDefaultImpl()
JsonTypeInfo.Id
getIdType()
boolean
getIdVisible()
JsonTypeInfo.As
getInclusionType()
java.lang.String
getPropertyName()
java.lang.Boolean
getRequireTypeIdForSubtypes()
int
hashCode()
static boolean
isEnabled(JsonTypeInfo.Value v)
Static helper method for simple(r) checking of whether there's a Value instance that indicates that polymorphic handling is (to be) enabled.java.lang.String
toString()
java.lang.Class<JsonTypeInfo>
valueFor()
Introspection method that may be used to find actual annotation that may be used as the source for value instance.JsonTypeInfo.Value
withDefaultImpl(java.lang.Class<?> impl)
JsonTypeInfo.Value
withIdType(JsonTypeInfo.Id idType)
JsonTypeInfo.Value
withIdVisible(boolean visible)
JsonTypeInfo.Value
withInclusionType(JsonTypeInfo.As inclusionType)
JsonTypeInfo.Value
withPropertyName(java.lang.String propName)
JsonTypeInfo.Value
withRequireTypeIdForSubtypes(java.lang.Boolean requireTypeIdForSubtypes)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
EMPTY
protected static final JsonTypeInfo.Value EMPTY
-
_idType
protected final JsonTypeInfo.Id _idType
-
_inclusionType
protected final JsonTypeInfo.As _inclusionType
-
_propertyName
protected final java.lang.String _propertyName
-
_defaultImpl
protected final java.lang.Class<?> _defaultImpl
-
_idVisible
protected final boolean _idVisible
-
_requireTypeIdForSubtypes
protected final java.lang.Boolean _requireTypeIdForSubtypes
-
-
Constructor Detail
-
Value
protected Value(JsonTypeInfo.Id idType, JsonTypeInfo.As inclusionType, java.lang.String propertyName, java.lang.Class<?> defaultImpl, boolean idVisible, java.lang.Boolean requireTypeIdForSubtypes)
-
-
Method Detail
-
construct
public static JsonTypeInfo.Value construct(JsonTypeInfo.Id idType, JsonTypeInfo.As inclusionType, java.lang.String propertyName, java.lang.Class<?> defaultImpl, boolean idVisible, java.lang.Boolean requireTypeIdForSubtypes)
-
from
public static JsonTypeInfo.Value from(JsonTypeInfo src)
-
withDefaultImpl
public JsonTypeInfo.Value withDefaultImpl(java.lang.Class<?> impl)
-
withIdType
public JsonTypeInfo.Value withIdType(JsonTypeInfo.Id idType)
-
withInclusionType
public JsonTypeInfo.Value withInclusionType(JsonTypeInfo.As inclusionType)
-
withPropertyName
public JsonTypeInfo.Value withPropertyName(java.lang.String propName)
-
withIdVisible
public JsonTypeInfo.Value withIdVisible(boolean visible)
-
withRequireTypeIdForSubtypes
public JsonTypeInfo.Value withRequireTypeIdForSubtypes(java.lang.Boolean requireTypeIdForSubtypes)
-
valueFor
public java.lang.Class<JsonTypeInfo> 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<JsonTypeInfo>
- Returns:
- Annotation class for which instances of this value class are created
-
getDefaultImpl
public java.lang.Class<?> getDefaultImpl()
-
getIdType
public JsonTypeInfo.Id getIdType()
-
getInclusionType
public JsonTypeInfo.As getInclusionType()
-
getPropertyName
public java.lang.String getPropertyName()
-
getIdVisible
public boolean getIdVisible()
-
getRequireTypeIdForSubtypes
public java.lang.Boolean getRequireTypeIdForSubtypes()
-
isEnabled
public static boolean isEnabled(JsonTypeInfo.Value v)
Static helper method for simple(r) checking of whether there's a Value instance that indicates that polymorphic handling is (to be) enabled.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
_equals
private static boolean _equals(JsonTypeInfo.Value a, JsonTypeInfo.Value b)
-
_equal
private static <T> boolean _equal(T value1, T value2)
-
-