public abstract class TypeToken<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TypeToken.MissingTypeParameterError
Error thrown, if the sub-type does not give a proper parameterization.
|
Constructor and Description |
---|
TypeToken() |
Modifier and Type | Method and Description |
---|---|
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.
|
public final 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)
superclass
is performed.Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500