org.apache.commons.collections.functors
Class InstantiateTransformer
java.lang.Objectorg.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: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $
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-2008 Apache Software Foundation. All Rights Reserved.