Package org.modelmapper
Class TypeToken<T>
java.lang.Object
org.modelmapper.TypeToken<T>
- Type Parameters:
- T- Represented type
Represents a generic type 
T. Subclassing TypeToken allows for type information to be
 preserved at runtime.
 
 
 Example: To create a type literal for List<String>, you can create an empty anonymous
 inner class:
 
 
 TypeToken<List<String>> list = new TypeToken<List<String>>();
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
TypeTokenprotected TypeToken()Creates a new type token forT.- Throws:
- IllegalArgumentException- if- Tis not provided or is a TypeVariable
 
 
- 
- 
Method Details- 
ofReturns a TypeLiteral for thetype.- Throws:
- IllegalArgumentException- if- typeis null or if a raw type cannot be resolved
 
- 
equals
- 
getRawTypeReturns the raw type forT.- If Tis aClass,Titself is returned.
- If Tis aParameterizedType, the raw type is returned
- If Tis aGenericArrayType, the raw type is returned
- If Tis aTypeVariableorWildcardType, the raw type of the first upper bound is returned
 
- If 
- 
getTypeReturns the generic typeT.
- 
hashCodepublic final int hashCode()
- 
toString
 
-