Interface ScriptEngineRegistry
public interface ScriptEngineRegistry
Registry to handle the different script engines.
- Since:
- 4.0.120
-
Method Summary
Modifier and TypeMethodDescriptionReturns a collection that contains the names of the script engines.getScriptEngine
(@NotNull String engineName) Returns the script engine specified by given name.getScriptEngineForSource
(@NotNull String scriptSource) Tries to parse the script source to determine the script engine type.
-
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
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
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
-