net.esper.util
Class GenericFactory<T>

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

public class GenericFactory<T>
extends Object

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


Constructor Summary
GenericFactory(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(Class<T> clazz)
Ctor.

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

create

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

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