net.esper.util
Class GenericFactory<T>

java.lang.Object
  extended by net.esper.util.GenericFactory<T>

public class GenericFactory<T>
extends java.lang.Object

Factory for an instance of any type. Employs Class.newInstance to instantiate.


Constructor Summary
GenericFactory(java.lang.Class<T> clazz)
          Ctor.
 
Method Summary
 T create()
          Create instance of class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericFactory

public GenericFactory(java.lang.Class<T> clazz)
Ctor.

Parameters:
clazz - Class of which instace must be created
Method Detail

create

public T create()
         throws java.lang.IllegalAccessException,
                java.lang.InstantiationException
Create instance of class.

Returns:
instance
Throws:
java.lang.IllegalAccessException - is thrown by Class.newInstance
java.lang.InstantiationException - is thrown by Class.newInstance