|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.jackson.type.JavaType
public abstract class JavaType
Base class for type token classes used both to contain information and as keys for deserializers.
Instances can (only) be constructed by
TypeFactory.
| Field Summary | |
|---|---|
protected java.lang.Class<?> |
_class
This is the nominal type-erased Class that would be close to the type represented (but not exactly type, due to type erasure: type instance may have more information on this). |
protected int |
_hashCode
|
| Constructor Summary | |
|---|---|
protected |
JavaType(java.lang.Class<?> clz)
|
| Method Summary | |
|---|---|
protected void |
_assertSubclass(java.lang.Class<?> subclass,
java.lang.Class<?> superClass)
|
protected abstract JavaType |
_narrow(java.lang.Class<?> subclass)
|
abstract boolean |
equals(java.lang.Object o)
|
java.lang.Class<?> |
getRawClass()
|
int |
hashCode()
|
boolean |
hasRawClass(java.lang.Class<?> clz)
Method that can be used to check whether this type has specified Class as its type erasure. |
boolean |
isAbstract()
|
boolean |
isArrayType()
|
abstract boolean |
isContainerType()
|
boolean |
isEnumType()
|
abstract boolean |
isFullyTyped()
Method that can be used to check whether type described is fully typed, regarding the way JavaTypes are used for deserialization. |
boolean |
isInterface()
|
boolean |
isPrimitive()
|
JavaType |
narrowBy(java.lang.Class<?> subclass)
Method that can be called to do a "narrowing" conversions; that is, to return a type with a raw class that is assignable to the raw class of this type. |
abstract JavaType |
narrowContentsBy(java.lang.Class<?> contentClass)
|
abstract java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.Class<?> _class
protected int _hashCode
| Constructor Detail |
|---|
protected JavaType(java.lang.Class<?> clz)
| Method Detail |
|---|
public final JavaType narrowBy(java.lang.Class<?> subclass)
IllegalArgumentException is thrown.
If class is same as the current raw class, instance itself is
returned.
protected abstract JavaType _narrow(java.lang.Class<?> subclass)
public abstract JavaType narrowContentsBy(java.lang.Class<?> contentClass)
public final java.lang.Class<?> getRawClass()
public final boolean hasRawClass(java.lang.Class<?> clz)
public abstract boolean isFullyTyped()
public abstract boolean isContainerType()
public final boolean isAbstract()
public final boolean isArrayType()
public final boolean isEnumType()
public final boolean isInterface()
public final boolean isPrimitive()
protected void _assertSubclass(java.lang.Class<?> subclass,
java.lang.Class<?> superClass)
public abstract java.lang.String toString()
toString in class java.lang.Objectpublic abstract boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||