Interface ScriptEngineRegistry


public interface ScriptEngineRegistry
Registry to handle the different script engines.
Since:
4.0.120
  • Method Details

    • getEngineNames

      Collection<String> getEngineNames()
      Returns a collection that contains the names of the script engines.
      Returns:
      the names of the script engines.
      Since:
      4.0.120
    • getScriptEngine

      ScriptEngine getScriptEngine(@NotNull @NotNull String engineName) throws UnsupportedScriptEngine
      Returns the script engine specified by given name.
      Parameters:
      engineName - the name of the engine to get.
      Returns:
      the script engine.
      Throws:
      UnsupportedScriptEngine - if script engine is not supported.
      Since:
      4.0.120
    • getScriptEngineForSource

      ScriptEngine getScriptEngineForSource(@NotNull @NotNull String scriptSource)
      Tries to parse the script source to determine the script engine type. Usually the first line of the script source contains something like "#! beanshell". Fallback is the beanshell script engine.
      Parameters:
      scriptSource - the source of the script.
      Returns:
      the script engine.
      Since:
      4.0.120