org.apache.tools.ant.util.optional

Class JavaxScriptRunner


public class JavaxScriptRunner
extends ScriptRunnerBase

This class is used to run scripts using JSR 223.
Since:
Ant 1.7.0

Method Summary

Object
evaluateScript(String execName)
Do the work to eval the script.
void
executeScript(String execName)
Do the work to run the script.
String
getManagerName()
Get the name of the manager prefix.
boolean
supportsLanguage()
.

Methods inherited from class org.apache.tools.ant.util.ScriptRunnerBase

addBean, addBeans, addText, bindToComponent, bindToComponentMinimum, checkLanguage, clearScript, evaluateScript, executeScript, getBeans, getKeepEngine, getLanguage, getManagerName, getProject, getScript, getScriptClassLoader, replaceContextLoader, restoreContextLoader, setKeepEngine, setLanguage, setProject, setScriptClassLoader, setSrc, supportsLanguage

Method Details

evaluateScript

public Object evaluateScript(String execName)
            throws BuildException
Do the work to eval the script.
Overrides:
evaluateScript in interface ScriptRunnerBase
Parameters:
execName - the name that will be passed to the scripting engine for this script execution.
Returns:
the result of the evalulation
Throws:
BuildException - if someting goes wrong exectuing the script.

executeScript

public void executeScript(String execName)
            throws BuildException
Do the work to run the script.
Overrides:
executeScript in interface ScriptRunnerBase
Parameters:
execName - the name that will be passed to the scripting engine for this script execution.
Throws:
BuildException - if someting goes wrong exectuing the script.

getManagerName

public String getManagerName()
Get the name of the manager prefix.
Overrides:
getManagerName in interface ScriptRunnerBase
Returns:
"javax"

supportsLanguage

public boolean supportsLanguage()
.
Overrides:
supportsLanguage in interface ScriptRunnerBase