public class InvokerTransformer<I,O> extends Objectimplements Transformer <I ,O>
WARNING: from v4.1 onwards this class will not be serializable anymore in order to prevent potential remote code execution exploits. Please refer to COLLECTIONS-580 for more details.
| Constructor and Description |
|---|
InvokerTransformer(String
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
static <I |
invokerTransformer(String
Gets an instance of this transformer calling a specific method with no arguments.
|
static <I |
invokerTransformer(String
Gets an instance of this transformer calling a specific method with specific values.
|
O |
transform(Object
Transforms the input to result by invoking a method on the input.
|
public InvokerTransformer(StringmethodName, Class <?>[] paramTypes, Object [] args)
invokerTransformer if you want that.
Note: from 4.0, the input parameters will be cloned
methodName - the method to call
paramTypes - the constructor parameter types
args - the constructor arguments
public static <I,O> Transformer <I ,O> invokerTransformer(String methodName)
I - the input type
O - the output type
methodName - the method name to call
NullPointerException - if methodName is null
public static <I,O> Transformer <I ,O> invokerTransformer(String methodName, Class <?>[] paramTypes, Object [] args)
I - the input type
O - the output type
methodName - the method name to call
paramTypes - the parameter types of the method
args - the arguments to pass to the method
NullPointerException - if methodName is null
IllegalArgumentException - if paramTypes does not match args