public class CompositeScriptHelper extends AbstractScriptHelper
Constructor and Description |
---|
CompositeScriptHelper(Context context) |
CompositeScriptHelper(ScriptBindings bindings) |
Modifier and Type | Method and 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)
Evaluate the given expression.
|
getBindings, setBindings, test
public CompositeScriptHelper(ScriptBindings bindings)
public CompositeScriptHelper(Context context)
public Object call(Object obj, String methodCall)
ScriptHelper
scriptHelper.call(bean, "test(var1, var2, var3)");This is a convenient method to call:
scriptHelper.call(bean, "test", new Object[] { var1, var2, var3 });
call
in interface ScriptHelper
call
in class AbstractScriptHelper
obj
- the object on which method should be calledmethodCall
- method call expressionprotected Object doCall(Object obj, String methodCall)
doCall
in class AbstractScriptHelper
public Object eval(String expr)
ScriptHelper
expr
- the expression to evaluate