net.sf.beanlib.utils
Class TypeReference<T>

java.lang.Object
  extended by net.sf.beanlib.utils.TypeReference<T>

public abstract class TypeReference<T>
extends Object

References a generic type.

Author:
crazybob@google.com (Bob Lee)

Field Summary
private  Constructor<?> constructor
           
private  Type type
           
 
Constructor Summary
protected TypeReference()
           
 
Method Summary
 Type getType()
          Gets the referenced type.
static void main(String[] args)
           
 T newInstance()
          Instantiates a new instance of T using the default, no-arg constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

private final Type type

constructor

private volatile Constructor<?> constructor
Constructor Detail

TypeReference

protected TypeReference()
Method Detail

newInstance

public T newInstance()
              throws NoSuchMethodException,
                     IllegalAccessException,
                     InvocationTargetException,
                     InstantiationException
Instantiates a new instance of T using the default, no-arg constructor.

Throws:
NoSuchMethodException
IllegalAccessException
InvocationTargetException
InstantiationException

getType

public Type getType()
Gets the referenced type.


main

public static void main(String[] args)
                 throws Exception
Throws:
Exception