edu.wisc.ssec.mcidasv.jython
Class EjectCommand

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

 class EjectCommand
extends Command

This class represents a Command that removes an object from the local namespace of an Interpreter. These commands can remove any Jython objects, while InjectCommand may only inject Java objects.


Field Summary
private  String name
          Name of the Jython object to remove.
 
Fields inherited from class edu.wisc.ssec.mcidasv.jython.Command
console
 
Constructor Summary
EjectCommand(Console console, String name)
          Creates an ejection command for name.
 
Method Summary
 void execute(Interpreter interpreter)
          Attempts to remove whatever Jython knows as name from the local namespace of interpreter.
 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

name

private String name
Name of the Jython object to remove.

Constructor Detail

EjectCommand

public EjectCommand(Console console,
                    String name)
Creates an ejection command for name.

Parameters:
console - Console that requested name's removal.
name - Name of the Jython object that needs removin'.
Method Detail

execute

public void execute(Interpreter interpreter)
             throws Exception
Attempts to remove whatever Jython knows as name from the local namespace of interpreter.

Specified by:
execute in class Command
Parameters:
interpreter - Interpreter whose local namespace is required.
Throws:
Exception - if PyObject.__delitem__(PyObject) had some second thoughts about ejection.

toString

public String toString()
Overrides:
toString in class Object