Class TypeToken<T>
- java.lang.Object
-
- com.googlecode.objectify.repackaged.gentyref.TypeToken<T>
-
- Type Parameters:
T
- The type represented by this TypeToken.
public abstract class TypeToken<T> extends Object
Wrapper aroundType
. You can use this to create instances of Type for a type known at compile time. For example, to get the Type that represents List<String>:Type listOfString = new TypeToken<List<String>>(){}.getType();
- Author:
- Wouter Coekaerts
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TypeToken()
Constructs a type token.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static <T> TypeToken<T>
get(Class<T> type)
Gets type token for the givenClass
instance.static TypeToken<?>
get(Type type)
Gets type token for the givenType
instance.Type
getType()
int
hashCode()
-