edu.wisc.ssec.mcidasv.jython
Class InjectCommand
java.lang.Object
edu.wisc.ssec.mcidasv.jython.Command
edu.wisc.ssec.mcidasv.jython.InjectCommand
class InjectCommand
- extends Command
This class represents a Command
that injects a standard Java
variable into the local namespace of an Interpreter
. This is useful
for allowing Jython to manipulate objects created by the IDV or McIDAS-V.
Field Summary |
private String |
name
Name Jython will use to refer to object . |
private Object |
object
Wrapper around the Java object that is being injected. |
Fields inherited from class edu.wisc.ssec.mcidasv.jython.Command |
console |
name
private String name
- Name Jython will use to refer to
object
.
object
private Object object
- Wrapper around the Java object that is being injected.
InjectCommand
public InjectCommand(Console console,
String name,
Object object)
- Creates an injection command based upon the specified name and object.
- Parameters:
console
- Likely not required in this context!name
- Name Jython will use to refer to object
.object
- Wrapper around the Java object that is being injected.
execute
public void execute(Interpreter interpreter)
throws Exception
- Attempts to inject a variable created in Java into the local namespace
of
interpreter
.
- Specified by:
execute
in class Command
- Parameters:
interpreter
- Interpreter that will execute this command.
- Throws:
Exception
- if PythonInterpreter.set(String, PyObject)
had
problems.
toString
public String toString()
- Overrides:
toString
in class Object