org.apache.tools.ant.util.optional

Class ScriptRunner

public class ScriptRunner extends ScriptRunnerBase

This class is used to run BSF scripts
Method Summary
ObjectevaluateScript(String execName)
Evaluate the script.
voidexecuteScript(String execName)
Do the work.
StringgetManagerName()
Get the name of the manager prefix.
booleansupportsLanguage()
Check if bsf supports the language.

Method Detail

evaluateScript

public Object evaluateScript(String execName)
Evaluate the script.

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.

executeScript

public void executeScript(String execName)
Do the work.

Parameters: execName the name that will be passed to BSF for this script execution.

Throws: BuildException if something goes wrong executing the script.

getManagerName

public String getManagerName()
Get the name of the manager prefix.

Returns: "bsf"

supportsLanguage

public boolean supportsLanguage()
Check if bsf supports the language.

Returns: true if bsf can create an engine for this language.