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 Details

    • ScriptRunner

      public ScriptRunner()
  • Method Details

    • getManagerName

      public String getManagerName()
      Get the name of the manager prefix.
      Specified by:
      getManagerName in class ScriptRunnerBase
      Returns:
      "bsf"
    • supportsLanguage

      public boolean supportsLanguage()
      Check if bsf supports the language.
      Specified by:
      supportsLanguage in class ScriptRunnerBase
      Returns:
      true if bsf can create an engine for this language.
    • executeScript

      public void executeScript(String execName) throws BuildException
      Do the work.
      Specified by:
      executeScript in class ScriptRunnerBase
      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 Object evaluateScript(String execName) throws BuildException
      Evaluate the script.
      Specified by:
      evaluateScript in class ScriptRunnerBase
      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.