public class MethodInvokingTransformer extends Object implements FunctionTransformer
MethodInvokingFactoryBean
Transformer
.
Passes input as arguments to method. If the input is an Object[] then each index represents an argument else the entire is assumed to be a single input argument.SpELTransformer
Constructor and Description |
---|
MethodInvokingTransformer() |
MethodInvokingTransformer(Class targetClass,
String targetMethod) |
MethodInvokingTransformer(Object targetObject,
String targetMethod) |
Modifier and Type | Method and Description |
---|---|
Class |
getTargetClass() |
String |
getTargetMethod() |
Object |
getTargetObject() |
boolean |
isInputAsTargetObject()
If true then
targetObject will be ignored and the input will be assumed to be the target object. |
boolean |
isNoArguments()
If the method name conflicts with another and we wish to invoke a No argument method then
make this flag true
|
boolean |
isReturnInput()
If true, the output of this instance will return the input (for chaining purposes)
|
void |
setInputAsTargetObject(boolean inputAsTargetObject)
If true then
targetObject will be ignored and the input will be assumed to be the target object. |
void |
setNoArguments(boolean noArguments)
If the method name conflicts with another and we wish to invoke a No argument method then
make this flag true
|
void |
setReturnInput(boolean returnInput)
If true, the output of this instance will return the input (for chaining purposes)
|
void |
setTargetClass(Class targetClass) |
void |
setTargetMethod(String targetMethod) |
void |
setTargetObject(Object targetObject) |
Object |
transform(Object input) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public Class getTargetClass()
public void setTargetClass(Class targetClass)
public Object getTargetObject()
public void setTargetObject(Object targetObject)
public String getTargetMethod()
public void setTargetMethod(String targetMethod)
public boolean isNoArguments()
public void setNoArguments(boolean noArguments)
public boolean isInputAsTargetObject()
targetObject
will be ignored and the input will be assumed to be the target object.public void setInputAsTargetObject(boolean inputAsTargetObject)
targetObject
will be ignored and the input will be assumed to be the target object.public boolean isReturnInput()
public void setReturnInput(boolean returnInput)
Copyright © 2018. All rights reserved.