org.apache.commons.collections.functors
Class InvokerTransformer
java.lang.Objectorg.apache.commons.collections.functors.InvokerTransformer
- Serializable, Transformer
public class InvokerTransformer
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) $InvokerTransformer(String methodName, Class[] paramTypes, Object[] args)- Constructor that performs no validation.
|
static Transformer | getInstance(String methodName)- Gets an instance of this transformer calling a specific method with no arguments.
|
static Transformer | getInstance(String methodName, Class[] paramTypes, Object[] args)- Gets an instance of this transformer calling a specific method with specific values.
|
Object | transform(Object input)- Transforms the input to result by invoking a method on the input.
|
InvokerTransformer
public InvokerTransformer(String methodName,
Class[] paramTypes,
Object[] args) Constructor that performs no validation.
Use getInstance if you want that.
methodName - the method to callparamTypes - the constructor parameter types, not clonedargs - the constructor arguments, not cloned
getInstance
public static Transformer getInstance(String methodName)
Gets an instance of this transformer calling a specific method with no arguments.
methodName - the method name to call
getInstance
public static Transformer getInstance(String methodName,
Class[] paramTypes,
Object[] args) Gets an instance of this transformer calling a specific method with specific values.
methodName - the method name to callparamTypes - the parameter types of the methodargs - the arguments to pass to the method
transform
public Object transform(Object input)
Transforms the input to result by invoking a method on the input.
- transform in interface Transformer
input - the input object to transform
- the transformed result, null if null input
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.