Interface ScriptEngine


public interface ScriptEngine
Type definition of a script engine.
Since:
4.0.120
  • Method Details

    • setClassLoader

      void setClassLoader(ClassLoader classLoader)
      Defines the class loader to be used on executing the script.
      Parameters:
      classLoader - The class loader to be used.
      Since:
      4.0.120
    • getScriptEngineName

      String getScriptEngineName()
      Provides the name of this script engine.
      Returns:
      The script engine's name.
      Since:
      4.0.120
    • getExecutable

      Executable getExecutable(String scriptSource) throws SyntaxError
      Creates an executable from the given script source code.
      Parameters:
      scriptSource - The source code.
      Returns:
      The created executable.
      Throws:
      SyntaxError - if the given code contains syntactical errors.
      Since:
      4.0.120
    • checkSyntax

      void checkSyntax(String scriptSource) throws SyntaxError
      Allows to check the syntax of the given script source code.
      Parameters:
      scriptSource - The script's source code.
      Throws:
      SyntaxError - if the given code contains syntactical errors.
      Since:
      4.0.120