Class TypeRef<T>

Type Parameters:
T - The type to represent

public abstract class TypeRef<T> extends Object
Conveys generic type information at run time.

Create an anonymous subclass parameterized with the type you want to represent. For example:

 TypeRef<List<String>> listOfStrings = new TypeRef<List<String>>(){};
Implementation Note:
Uses the technique described in Neal Gafter's article on Super Type Tokens.
  • Constructor Details

    • TypeRef

      protected TypeRef()
  • Method Details