JavaxScriptRunner (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.util.optional, class: JavaxScriptRunner

Package org.apache.tools.ant.util.optional

# Class JavaxScriptRunner

java.lang.Object
org.apache.tools.ant.util.ScriptRunnerBase
org.apache.tools.ant.util.optional.JavaxScriptRunner

    public class JavaxScriptRunner
    extends ScriptRunnerBase

This class is used to run scripts using JSR 223.

Since:
  Ant 1.7.0

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `JavaxScriptRunner()` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.lang.Object` | `evaluateScript​(java.lang.String execName)` | Do the work to eval the script.
  `void` | `executeScript​(java.lang.String execName)` | Do the work to run the script.
  `java.lang.String` | `getManagerName()` | Get the name of the manager prefix.
  `boolean` | `supportsLanguage()` | Check if a script engine can be created for this 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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JavaxScriptRunner

    public JavaxScriptRunner()

- ## Method Details

  - ### getManagerName

    public java.lang.String getManagerName()
    Get the name of the manager prefix.
    Specified by:
      `getManagerName` in class `ScriptRunnerBase`
    Returns:
      "javax"

  - ### supportsLanguage

    public boolean supportsLanguage()
    Check if a script engine can be created for this language..
    Specified by:
      `supportsLanguage` in class `ScriptRunnerBase`
    Returns:
      true if a script engine can be created, false otherwise.

  - ### executeScript

    public void executeScript​(java.lang.String execName) throws BuildException
    Do the work to run the script.
    Specified by:
      `executeScript` in class `ScriptRunnerBase`
    Parameters:
      `execName` - the name that will be passed to the scripting engine for this script execution.
    Throws:
      `BuildException` - if something goes wrong executing the script.

  - ### evaluateScript

    public java.lang.Object evaluateScript​(java.lang.String execName) throws BuildException
    Do the work to eval the script.
    Specified by:
      `evaluateScript` in class `ScriptRunnerBase`
    Parameters:
      `execName` - the name that will be passed to the scripting engine for this script execution.
    Returns:
      the result of the evaluation
    Throws:
      `BuildException` - if something goes wrong executing the script.