|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scijava.script.DefaultScriptInterpreter
public class DefaultScriptInterpreter
The default implementation of a ScriptInterpreter
.
Constructor Summary | |
---|---|
DefaultScriptInterpreter(PrefService prefs,
ScriptService scriptService,
ScriptLanguage language)
Constructs a new DefaultScriptInterpreter . |
Method Summary | |
---|---|
void |
eval(String command)
Evaluates a command. |
ScriptEngine |
getEngine()
Returns the associated ScriptEngine . |
ScriptLanguage |
getLanguage()
Returns the associated ScriptLanguage . |
void |
readHistory()
Reads the persisted history of the current script interpreter. |
String |
walkHistory(String currentCommand,
boolean forward)
Obtains the next/previous command in the command history. |
void |
writeHistory()
Persists the history of the current script interpreter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultScriptInterpreter(PrefService prefs, ScriptService scriptService, ScriptLanguage language)
DefaultScriptInterpreter
.
scriptService
- the script servicelanguage
- the script languageMethod Detail |
---|
public void readHistory()
ScriptInterpreter
readHistory
in interface ScriptInterpreter
public void writeHistory()
ScriptInterpreter
writeHistory
in interface ScriptInterpreter
public String walkHistory(String currentCommand, boolean forward)
ScriptInterpreter
walkHistory
in interface ScriptInterpreter
currentCommand
- the current command (will be stored in the history)forward
- if true, the next history entry is returned (more recent),
if false, the previous one
public void eval(String command) throws ScriptException
ScriptInterpreter
eval
in interface ScriptInterpreter
command
- the command to evaluate
ScriptException
public ScriptLanguage getLanguage()
ScriptInterpreter
ScriptLanguage
.
getLanguage
in interface ScriptInterpreter
public ScriptEngine getEngine()
ScriptInterpreter
ScriptEngine
.
getEngine
in interface ScriptInterpreter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |