|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wisc.ssec.mcidasv.jython.Command
public abstract class Command
A Command
is an action that can alter the state of an
Interpreter
.
Field Summary | |
---|---|
protected Console |
console
Console that created this command. |
Constructor Summary | |
---|---|
Command(Console console)
Creates a command. |
Method Summary | |
---|---|
abstract void |
execute(Interpreter interpreter)
Hook to provide various implementations of command execution. |
protected InputStream |
getInputStream(String path)
Creates a InputStream using path . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Console console
Constructor Detail |
---|
public Command(Console console)
console
- Console that created this command.Method Detail |
---|
public abstract void execute(Interpreter interpreter) throws Exception
interpreter
- Jython interpreter that will execute the command.
Exception
- An error was encountered executing the command. Jython
will catch three standard Python exceptions: SyntaxError, ValueError,
and OverflowError. Other exceptions are thrown.protected InputStream getInputStream(String path) throws Exception
InputStream
using path
. It's here entirely for
convenience.
path
- Path to the desired file.
path
.
Exception
- if there was badness.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |