Class BeanShellScriptInterpreter
java.lang.Object
org.apache.maven.shared.scriptinterpreter.BeanShellScriptInterpreter
- All Implemented Interfaces:
ScriptInterpreter
Provides a facade to evaluate BeanShell scripts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluateScript
(String script, List<String> classPath, Map<String, ? extends Object> globalVariables, PrintStream scriptOutput) Evaluates the specified script.
-
Constructor Details
-
BeanShellScriptInterpreter
BeanShellScriptInterpreter()
-
-
Method Details
-
evaluateScript
public Object evaluateScript(String script, List<String> classPath, Map<String, ? extends Object> globalVariables, PrintStream scriptOutput) throws ScriptEvaluationExceptionEvaluates the specified script.- Specified by:
evaluateScript
in interfaceScriptInterpreter
- Parameters:
script
- The script contents to evaluate, must not benull
.classPath
- The additional class path for the script interpreter, may benull
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 benull
if not used.scriptOutput
- A print stream to redirect any output from the script to, may benull
to use stdout/stderr.- Returns:
- The return value from the script, can be
null
- Throws:
ScriptEvaluationException
- If the script evaluation produced an error.
-