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 Details

    • name

      private String name
      Name of the Jython object to remove.
  • Constructor Details

    • 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 Details

    • 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