public class InstantiateFactory<T> extends java.lang.Object implements Factory<T>, java.io.Serializable
| Constructor and Description |
|---|
InstantiateFactory(java.lang.Class<T> classToInstantiate)
Constructor that performs no validation.
|
InstantiateFactory(java.lang.Class<T> classToInstantiate,
java.lang.Class<?>[] paramTypes,
java.lang.Object[] args)
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
T |
create()
Creates an object using the stored constructor.
|
static <T> Factory<T> |
instantiateFactory(java.lang.Class<T> classToInstantiate,
java.lang.Class<?>[] paramTypes,
java.lang.Object[] args)
Factory method that performs validation.
|
public InstantiateFactory(java.lang.Class<T> classToInstantiate)
instantiateFactory if you want that.classToInstantiate - the class to instantiatepublic InstantiateFactory(java.lang.Class<T> classToInstantiate, java.lang.Class<?>[] paramTypes, java.lang.Object[] args)
instantiateFactory if you want that.classToInstantiate - the class to instantiateparamTypes - the constructor parameter types, clonedargs - the constructor arguments, clonedpublic static <T> Factory<T> instantiateFactory(java.lang.Class<T> classToInstantiate, java.lang.Class<?>[] paramTypes, java.lang.Object[] args)
T - the type the factory createsclassToInstantiate - the class to instantiate, not nullparamTypes - the constructor parameter types, clonedargs - the constructor arguments, clonedCopyright © 2001-2013. All Rights Reserved.