r01f.generics
Class TypeRef<T>

java.lang.Object
  extended by r01f.generics.TypeRef<T>
Type Parameters:
T - the generic type in this reference.

public abstract class TypeRef<T>
extends java.lang.Object

Reference to a generic type. Based on Neal Gafter's TypeReference.


Field Summary
private  java.lang.Class<?> _rawType
           
 
Constructor Summary
TypeRef()
          Creates a new TypeRef.
 
Method Summary
 java.lang.Class<?> rawType()
          Returns the raw type of the generic type in this reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rawType

private final java.lang.Class<?> _rawType
Constructor Detail

TypeRef

public TypeRef()
Creates a new TypeRef.

Throws:
java.lang.IllegalArgumentException - if the generic type of this reference is missing type parameter.
Method Detail

rawType

public final java.lang.Class<?> rawType()
Returns the raw type of the generic type in this reference.

Returns:
the raw type of the generic type in this reference.