edu.wisc.ssec.mcidasv.jython
Class LineCommand

java.lang.Object
  extended by edu.wisc.ssec.mcidasv.jython.Command
      extended by edu.wisc.ssec.mcidasv.jython.LineCommand

 class LineCommand
extends Command

This class is a type of Command that represents a line of Jython. These sorts of commands are only created by user input in a Console.


Field Summary
private  String command
          The line of jython that needs to be passed to the interpreter
 
Fields inherited from class edu.wisc.ssec.mcidasv.jython.Command
console
 
Constructor Summary
LineCommand(Console console, String command)
          Creates a command based upon the contents of command.
 
Method Summary
 void execute(Interpreter interpreter)
          Attempts to execute a line of Jython.
 String toString()
           
 
Methods inherited from class edu.wisc.ssec.mcidasv.jython.Command
getInputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

command

private String command
The line of jython that needs to be passed to the interpreter

Constructor Detail

LineCommand

public LineCommand(Console console,
                   String command)
Creates a command based upon the contents of command.

Parameters:
console - Console where the specified text came from.
command - Text that will be passed to an Interpreter for execution.
Method Detail

execute

public void execute(Interpreter interpreter)
             throws Exception
Attempts to execute a line of Jython. Displays the appropriate prompt on Command.console, depending upon whether Jython requires more input.

Specified by:
execute in class Command
Parameters:
interpreter - Interpreter that will execute this command.
Throws:
Exception - See Command.execute(Interpreter).

toString

public String toString()
Overrides:
toString in class Object