Package jmri.script
Class ScriptEngineSelector
- java.lang.Object
-
- jmri.script.ScriptEngineSelector
-
public class ScriptEngineSelector extends java.lang.Object
Selects a valid scripting engine.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScriptEngineSelector.Engine
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ECMA_SCRIPT
static java.lang.String
JYTHON
-
Constructor Summary
Constructors Constructor Description ScriptEngineSelector()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<ScriptEngineSelector.Engine>
getAllEngines()
Get a unmodifiable list of all the engines.ScriptEngineSelector.Engine
getSelectedEngine()
Get the selected engine.void
setSelectedEngine(java.lang.String languageName)
Sets the selected engine from the language name.void
setSelectedEngine(ScriptEngineSelector.Engine engine)
Sets the selected engine.
-
-
-
Field Detail
-
JYTHON
public static final java.lang.String JYTHON
- See Also:
- Constant Field Values
-
ECMA_SCRIPT
public static final java.lang.String ECMA_SCRIPT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ScriptEngineSelector
public ScriptEngineSelector()
-
-
Method Detail
-
getSelectedEngine
@CheckForNull public ScriptEngineSelector.Engine getSelectedEngine()
Get the selected engine.- Returns:
- the engine
-
setSelectedEngine
public void setSelectedEngine(@Nonnull ScriptEngineSelector.Engine engine)
Sets the selected engine.- Parameters:
engine
- the engine
-
setSelectedEngine
public void setSelectedEngine(@Nonnull java.lang.String languageName)
Sets the selected engine from the language name.- Parameters:
languageName
- the engine
-
getAllEngines
@Nonnull public static java.util.List<ScriptEngineSelector.Engine> getAllEngines()
Get a unmodifiable list of all the engines.- Returns:
- the list
-
-