@Incubating public class ScriptEngineScriptEvaluator extends Object implements ScriptEvaluator
ScriptEngine
s. This class is thread-safe.Constructor and Description |
---|
ScriptEngineScriptEvaluator(ScriptEngine engine)
Creates a new script executor.
|
Modifier and Type | Method and Description |
---|---|
Object |
evaluate(String script,
Map<String,Object> bindings)
Executes the given script, using the given variable bindings.
|
public ScriptEngineScriptEvaluator(ScriptEngine engine)
engine
- the engine to be wrappedpublic Object evaluate(String script, Map<String,Object> bindings) throws ScriptEvaluationException
evaluate
in interface ScriptEvaluator
script
- the script to be executedbindings
- the bindings to be usedScriptEvaluationException
- in case an error occurred during the script evaluationCopyright © 2021 JBoss by Red Hat. All rights reserved.