|
|||||||||
| 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 language| Method Detail |
|---|
public void readHistory()
ScriptInterpreter
readHistory in interface ScriptInterpreterpublic void writeHistory()
ScriptInterpreter
writeHistory in interface ScriptInterpreter
public String walkHistory(String currentCommand,
boolean forward)
ScriptInterpreter
walkHistory in interface ScriptInterpretercurrentCommand - 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 ScriptInterpretercommand - the command to evaluate
ScriptExceptionpublic ScriptLanguage getLanguage()
ScriptInterpreterScriptLanguage.
getLanguage in interface ScriptInterpreterpublic ScriptEngine getEngine()
ScriptInterpreterScriptEngine.
getEngine in interface ScriptInterpreter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||