Package org.codehaus.jackson.map.type
Class HierarchicType
- java.lang.Object
-
- org.codehaus.jackson.map.type.HierarchicType
-
public class HierarchicType extends java.lang.Object
Simple replacement forClass
(and/or various Type subtypes) that is used as part of single-path extends/implements chain to express specific relationship between one subtype and one supertype. This is needed for resolving type parameters. Instances are doubly-linked so that chain can be traversed in both directions- Since:
- 1.6
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.reflect.Type
_actualType
Type which will be either plainClass
orParameterizedType
.protected java.lang.reflect.ParameterizedType
_genericType
protected java.lang.Class<?>
_rawClass
protected HierarchicType
_subType
protected HierarchicType
_superType
-
Constructor Summary
Constructors Constructor Description HierarchicType(java.lang.reflect.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.ParameterizedType
asGeneric()
HierarchicType
deepCloneWithoutSubtype()
Method that can be used to create a deep clone of this hierarchic type, including super types (but not subtypes)java.lang.Class<?>
getRawClass()
HierarchicType
getSubType()
HierarchicType
getSuperType()
boolean
isGeneric()
void
setSubType(HierarchicType sub)
void
setSuperType(HierarchicType sup)
java.lang.String
toString()
-
-
-
Field Detail
-
_actualType
protected final java.lang.reflect.Type _actualType
Type which will be either plainClass
orParameterizedType
.
-
_rawClass
protected final java.lang.Class<?> _rawClass
-
_genericType
protected final java.lang.reflect.ParameterizedType _genericType
-
_superType
protected HierarchicType _superType
-
_subType
protected HierarchicType _subType
-
-
Method Detail
-
deepCloneWithoutSubtype
public HierarchicType deepCloneWithoutSubtype()
Method that can be used to create a deep clone of this hierarchic type, including super types (but not subtypes)- Since:
- 1.9
-
setSuperType
public void setSuperType(HierarchicType sup)
-
getSuperType
public final HierarchicType getSuperType()
-
setSubType
public void setSubType(HierarchicType sub)
-
getSubType
public final HierarchicType getSubType()
-
isGeneric
public final boolean isGeneric()
-
asGeneric
public final java.lang.reflect.ParameterizedType asGeneric()
-
getRawClass
public final java.lang.Class<?> getRawClass()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-