class LineCommand extends Command
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
command
The line of jython that needs to be passed to the interpreter
|
| Constructor and Description |
|---|
LineCommand(Console console,
java.lang.String command)
Creates a command based upon the contents of
command. |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Interpreter interpreter)
Attempts to execute a line of Jython.
|
java.lang.String |
toString() |
getInputStreamprivate java.lang.String command
public LineCommand(Console console, java.lang.String command)
command.console - Console where the specified text came from.command - Text that will be passed to an Interpreter for
execution.public void execute(Interpreter interpreter) throws java.lang.Exception
Command.console, depending upon whether Jython requires more
input.execute in class Commandinterpreter - Interpreter that will execute this command.java.lang.Exception - See Command.execute(Interpreter).public java.lang.String toString()
toString in class java.lang.Object