public interface ScriptHelper
| Modifier and Type | Method and Description |
|---|---|
Object |
call(Object obj,
String methodCall)
Call a method on the given object.
|
Object |
eval(String expr)
Evaluate the given expression.
|
ScriptBindings |
getBindings()
Get current script bindings.
|
void |
setBindings(ScriptBindings bindings)
Set script bindings.
|
boolean |
test(String expr)
Evaluate a boolean expression.
|
ScriptBindings getBindings()
void setBindings(ScriptBindings bindings)
bindings - new script bindings.Object eval(String expr)
expr - the expression to evaluateboolean test(String expr)
expr - a boolean expressionObject call(Object obj, String methodCall)
scriptHelper.call(bean, "test(var1, var2, var3)");This is a convenient method to call:
scriptHelper.call(bean, "test", new Object[] { var1, var2, var3 });
obj - the object on which method should be calledmethodCall - method call expression