Package com.axelor.script
Class CompositeScriptHelper
- java.lang.Object
-
- com.axelor.script.AbstractScriptHelper
-
- com.axelor.script.CompositeScriptHelper
-
- All Implemented Interfaces:
ScriptHelper
public class CompositeScriptHelper extends AbstractScriptHelper
-
-
Field Summary
-
Fields inherited from class com.axelor.script.AbstractScriptHelper
log
-
-
Constructor Summary
Constructors Constructor Description CompositeScriptHelper(Context context)
CompositeScriptHelper(Bindings bindings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
call(Object obj, String methodCall)
Call a method on the given object.protected Object
doCall(Object obj, String methodCall)
Object
eval(String expr, Bindings bindings)
Evaluate the given expression with the given bindings.-
Methods inherited from class com.axelor.script.AbstractScriptHelper
eval, getBindings, setBindings, test
-
-
-
-
Method Detail
-
call
public Object call(Object obj, String methodCall)
Description copied from interface:ScriptHelper
Call a method on the given object.The methodCall is a string expression containing arguments to be passed. For example:
scriptHelper.call(bean, "test(var1, var2, var3)");
This is a convenient method to call:scriptHelper.call(bean, "test", new Object[] { var1, var2, var3 });
- Specified by:
call
in interfaceScriptHelper
- Overrides:
call
in classAbstractScriptHelper
- Parameters:
obj
- the object on which method should be calledmethodCall
- method call expression- Returns:
- return value of the method
-
doCall
protected Object doCall(Object obj, String methodCall)
- Overrides:
doCall
in classAbstractScriptHelper
-
-