@Incubating public class ScriptEngineScriptEvaluator extends Object implements ScriptEvaluator
ScriptEngines. 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 ScriptEvaluatorscript - the script to be executedbindings - the bindings to be usedScriptEvaluationException - in case an error occurred during the script evaluationCopyright © 2019 JBoss by Red Hat. All rights reserved.