Package edu.wisc.ssec.mcidasv.jython
Class Command
java.lang.Object
edu.wisc.ssec.mcidasv.jython.Command
- Direct Known Subclasses:
BatchCommand
,EjectCommand
,InjectCommand
,LineCommand
,LoadFileCommand
,RegisterCallbackCommand
A
Command
is an action that can alter the state of an
Interpreter
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
execute
(Interpreter interpreter) Hook to provide various implementations of command execution.protected InputStream
getInputStream
(String path) Creates aInputStream
usingpath
.
-
Field Details
-
console
Console that created this command.
-
-
Constructor Details
-
Command
Creates a command.- Parameters:
console
- Console that created this command.
-
-
Method Details
-
execute
Hook to provide various implementations of command execution.- Parameters:
interpreter
- Jython interpreter that will execute the command.- Throws:
Exception
- An error was encountered executing the command. Jython will catch three standard Python exceptions: SyntaxError, ValueError, and OverflowError. Other exceptions are thrown.
-
getInputStream
Creates aInputStream
usingpath
. It's here entirely for convenience.- Parameters:
path
- Path to the desired file.- Returns:
- {code InputStream} for
path
. - Throws:
Exception
- if there was badness.
-