public class InvokerTransformer<I,O> extends Object implements 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 methodName,
Class<?>[] paramTypes,
Object[] args)
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
static <I,O> Transformer<I,O> |
invokerTransformer(String methodName)
Gets an instance of this transformer calling a specific method with no arguments.
|
static <I,O> Transformer<I,O> |
invokerTransformer(String methodName,
Class<?>[] paramTypes,
Object[] args)
Gets an instance of this transformer calling a specific method with specific values.
|
O |
transform(Object input)
Transforms the input to result by invoking a method on the input.
|
public InvokerTransformer(String methodName, Class<?>[] paramTypes, Object[] args)
invokerTransformer if you want that.
Note: from 4.0, the input parameters will be cloned
methodName - the method to callparamTypes - the constructor parameter typesargs - the constructor argumentspublic static <I,O> Transformer<I,O> invokerTransformer(String methodName)
I - the input typeO - the output typemethodName - the method name to callNullPointerException - if methodName is nullpublic static <I,O> Transformer<I,O> invokerTransformer(String methodName, Class<?>[] paramTypes, Object[] args)
I - the input typeO - the output typemethodName - the method name to callparamTypes - the parameter types of the methodargs - the arguments to pass to the methodNullPointerException - if methodName is nullIllegalArgumentException - if paramTypes does not match argsCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.