|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.espirit.common.lang.TypeToken<T>
public abstract class TypeToken<T>
Abstract type token implementation, click on Use-link above for further reading. This class is not intented to be subclassed by API-Users.
Nested Class Summary | |
---|---|
static class |
TypeToken.MissingTypeParameterError
Error thrown, if the sub-type does not give a proper parameterization. |
Method Summary | |
---|---|
T |
cast(Object object)
Cast the given object to the underlying type of this token. |
boolean |
equals(Object obj)
Generic equal implementation for type tokens that evaluates to equal, if the given object is an instance of the direct supertype of the questioned instance, plus having equal generic types. |
Type |
getType()
Gets the token's type. |
boolean |
isInstance(Object object)
Test the given object to be an instance of the underlying (raw) type of this token. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Type getType()
public T cast(Object object)
object
- The object to be cast.
public boolean isInstance(Object object)
object
- The object to be tested.
true
, iff the object is a matching instance.public final boolean equals(Object obj)
equals
in class Object
obj
- The object given for comparison.
true
, iff both instances have the same supertype and equal generic types.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |