org.apache.commons.collections.functors
Class InstantiateFactory
java.lang.Object
org.apache.commons.collections.functors.InstantiateFactory
- Factory, Serializable
public class InstantiateFactory
extends java.lang.Object
Factory implementation that creates a new object instance by reflection.
$Revision: 1.6 $ $Date: 2004/05/16 11:47:38 $InstantiateFactory(Class classToInstantiate) - Constructor that performs no validation.
|
InstantiateFactory(Class classToInstantiate, Class[] paramTypes, Object[] args) - Constructor that performs no validation.
|
Object | create() - Creates an object using the stored constructor.
|
static Factory | getInstance(Class classToInstantiate, Class[] paramTypes, Object[] args) - Factory method that performs validation.
|
InstantiateFactory
public InstantiateFactory(Class classToInstantiate)
Constructor that performs no validation.
Use getInstance
if you want that.
classToInstantiate
- the class to instantiate
InstantiateFactory
public InstantiateFactory(Class classToInstantiate,
Class[] paramTypes,
Object[] args)
Constructor that performs no validation.
Use getInstance
if you want that.
classToInstantiate
- the class to instantiateparamTypes
- the constructor parameter types, not clonedargs
- the constructor arguments, not cloned
create
public Object create()
Creates an object using the stored constructor.
- create in interface Factory
getInstance
public static Factory getInstance(Class classToInstantiate,
Class[] paramTypes,
Object[] args)
Factory method that performs validation.
classToInstantiate
- the class to instantiate, not nullparamTypes
- the constructor parameter typesargs
- the constructor arguments
- a new instantiate factory
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.