@Component(role=ScriptInterpreter.class, hint="groovy") public class GroovyScriptInterpreter extends Object implements ScriptInterpreter
| Constructor and Description |
|---|
GroovyScriptInterpreter() |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluateScript(String script,
List<String> classPath,
Map<String,? extends Object> globalVariables,
PrintStream scriptOutput)
Evaluates the specified script.
|
public Object evaluateScript(String script, List<String> classPath, Map<String,? extends Object> globalVariables, PrintStream scriptOutput) throws ScriptEvaluationException
evaluateScript in interface ScriptInterpreterscript - The script contents to evaluate, must not be null.classPath - The additional class path for the script interpreter, may be null or empty if only
the plugin realm should be used for the script evaluation. If specified, this class path will precede
the artifacts from the plugin class path.globalVariables - The global variables (as a mapping from variable name to value) to define for the script,
may be null if not used.scriptOutput - A print stream to redirect any output from the script to, may be null to use
stdout/stderr.nullScriptEvaluationException - If the script evaluation produced an error.Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.