Class TypeReference<T>
java.lang.Object
com.soklet.converter.TypeReference<T>
Construct for creating type tokens that represent generic types.
In Java, you may express a type token for a non-generic type like String.class
. But you cannot say
List<String>.class
. Using TypeReference
, you can express the latter as follows:
new TypeReference<List<String>>() {}
See http://gafter.blogspot.com/2006/12/super-type- tokens.html for more details.
- Author:
- Neal Gafter, Bob Lee, Mark Allen
-
Method Summary
-
Method Details
-
toString
-
equals
-
hashCode
-
getType
-