Class TypeReference<T>

java.lang.Object
com.soklet.util.TypeReference<T>

public abstract class TypeReference<T> extends Object
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.

Since:
1.0.0
Author:
Neal Gafter, Bob Lee, Mark Allen