org.apache.commons.collections.functors
Class InstantiateFactory
java.lang.Objectorg.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: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $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-2008 Apache Software Foundation. All Rights Reserved.