Class ScriptRunner
- java.lang.Object
-
- org.apache.tools.ant.util.ScriptRunnerBase
-
- org.apache.tools.ant.util.optional.ScriptRunner
-
- Direct Known Subclasses:
ScriptRunner
public class ScriptRunner extends ScriptRunnerBase
This class is used to run BSF scripts
-
-
Constructor Summary
Constructors Constructor Description ScriptRunner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectevaluateScript(java.lang.String execName)Evaluate the script.voidexecuteScript(java.lang.String execName)Do the work.java.lang.StringgetManagerName()Get the name of the manager prefix.booleansupportsLanguage()Check if bsf supports the language.-
Methods inherited from class org.apache.tools.ant.util.ScriptRunnerBase
addBean, addBeans, addText, bindToComponent, bindToComponentMinimum, checkLanguage, clearScript, getBeans, getCompiled, getKeepEngine, getLanguage, getProject, getScript, getScriptClassLoader, loadResource, loadResources, replaceContextLoader, restoreContextLoader, setCompiled, setEncoding, setKeepEngine, setLanguage, setProject, setScriptClassLoader, setSrc
-
-
-
-
Method Detail
-
getManagerName
public java.lang.String getManagerName()
Get the name of the manager prefix.- Specified by:
getManagerNamein classScriptRunnerBase- Returns:
- "bsf"
-
supportsLanguage
public boolean supportsLanguage()
Check if bsf supports the language.- Specified by:
supportsLanguagein classScriptRunnerBase- Returns:
- true if bsf can create an engine for this language.
-
executeScript
public void executeScript(java.lang.String execName) throws BuildExceptionDo the work.- Specified by:
executeScriptin classScriptRunnerBase- Parameters:
execName- the name that will be passed to BSF for this script execution.- Throws:
BuildException- if something goes wrong executing the script.
-
evaluateScript
public java.lang.Object evaluateScript(java.lang.String execName) throws BuildExceptionEvaluate the script.- Specified by:
evaluateScriptin classScriptRunnerBase- Parameters:
execName- the name that will be passed to BSF for this script execution.- Returns:
- the result of the evaluation
- Throws:
BuildException- if something goes wrong executing the script.
-
-