edu.wisc.ssec.mcidasv.jython
Class EjectCommand
java.lang.Object
edu.wisc.ssec.mcidasv.jython.Command
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 |
Method Summary |
void |
execute(Interpreter interpreter)
Attempts to remove whatever Jython knows as name from the local
namespace of interpreter . |
String |
toString()
|
name
private String name
- Name of the Jython object to remove.
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'.
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