org.apache.commons.collections.functors
Class InstantiateTransformer
java.lang.Object
org.apache.commons.collections.functors.InstantiateTransformer
- Serializable, Transformer
public class InstantiateTransformer
extends java.lang.Object
Transformer implementation that creates a new object instance by reflection.
$Revision: 1.6 $ $Date: 2004/05/16 11:36:31 $
static Transformer | getInstance(Class[] paramTypes, Object[] args) - Transformer method that performs validation.
|
Object | transform(Object input) - Transforms the input Class object to a result by instantiation.
|
NO_ARG_INSTANCE
public static final Transformer NO_ARG_INSTANCE
Singleton instance that uses the no arg constructor
InstantiateTransformer
public InstantiateTransformer(Class[] paramTypes,
Object[] args)
Constructor that performs no validation.
Use getInstance
if you want that.
paramTypes
- the constructor parameter types, not clonedargs
- the constructor arguments, not cloned
getInstance
public static Transformer getInstance(Class[] paramTypes,
Object[] args)
Transformer method that performs validation.
paramTypes
- the constructor parameter typesargs
- the constructor arguments
- an instantiate transformer
transform
public Object transform(Object input)
Transforms the input Class object to a result by instantiation.
- transform in interface Transformer
input
- the input object to transform
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.