public class InstantiateFactory<T> extends Objectimplements Factory <T>
WARNING: from v4.1 onwards this class will not be serializable anymore in order to prevent potential remote code execution exploits. Please refer to COLLECTIONS-580 for more details.
| Constructor and Description |
|---|
InstantiateFactory(Class
Constructor that performs no validation.
|
InstantiateFactory(Class
Constructor that performs no validation.
|
public InstantiateFactory(Class<T> classToInstantiate)
instantiateFactory if you want that.
classToInstantiate - the class to instantiate
public InstantiateFactory(Class<T> classToInstantiate, Class <?>[] paramTypes, Object [] args)
instantiateFactory if you want that.
classToInstantiate - the class to instantiate
paramTypes - the constructor parameter types, cloned
args - the constructor arguments, cloned
public static <T> Factory<T> instantiateFactory(Class <T> classToInstantiate, Class <?>[] paramTypes, Object [] args)
T - the type the factory creates
classToInstantiate - the class to instantiate, not null
paramTypes - the constructor parameter types, cloned
args - the constructor arguments, cloned
NullPointerException - if classToInstantiate is null
IllegalArgumentException - if paramTypes does not match args