public interface ScriptEvaluator
Aside from language-specific implementations, Spring also ships
a version based on the standard javax.script package (JSR-223):
StandardScriptEvaluator.
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
evaluate(ScriptSource script)
Evaluate the given script.
|
java.lang.Object |
evaluate(ScriptSource script,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Evaluate the given script with the given arguments.
|
java.lang.Object evaluate(ScriptSource script) throws ScriptCompilationException
script - the ScriptSource for the script to evaluateScriptCompilationException - if the evaluator failed to read,
compile or evaluate the scriptjava.lang.Object evaluate(ScriptSource script, java.util.Map<java.lang.String,java.lang.Object> arguments) throws ScriptCompilationException
script - the ScriptSource for the script to evaluatearguments - the key-value pairs to expose to the script,
typically as script variables (may be null or empty)ScriptCompilationException - if the evaluator failed to read,
compile or evaluate the script