public abstract class AbstractScriptHelper extends Object implements ScriptHelper
Constructor and Description |
---|
AbstractScriptHelper() |
Modifier and Type | Method and Description |
---|---|
Object |
call(Object obj,
String methodCall)
Call a method on the given object.
|
protected abstract Object |
doCall(Object obj,
String methodCall) |
ScriptBindings |
getBindings()
Get current script bindings.
|
void |
setBindings(ScriptBindings bindings)
Set script bindings.
|
boolean |
test(String expr)
Evaluate a boolean expression.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
eval
public ScriptBindings getBindings()
ScriptHelper
getBindings
in interface ScriptHelper
public void setBindings(ScriptBindings bindings)
ScriptHelper
setBindings
in interface ScriptHelper
bindings
- new script bindings.public final boolean test(String expr)
ScriptHelper
test
in interface ScriptHelper
expr
- a boolean expressionpublic 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
obj
- the object on which method should be calledmethodCall
- method call expression