class InjectCommand extends Command
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.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
name
Name Jython will use to refer to
object. |
private java.lang.Object |
object
Wrapper around the Java object that is being injected.
|
| Constructor and Description |
|---|
InjectCommand(Console console,
java.lang.String name,
java.lang.Object object)
Creates an injection command based upon the specified name and object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Interpreter interpreter)
Attempts to inject a variable created in Java into the local namespace
of
interpreter. |
java.lang.String |
toString() |
getInputStreamprivate java.lang.Object object
public InjectCommand(Console console, java.lang.String name, java.lang.Object object)
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.public void execute(Interpreter interpreter) throws java.lang.Exception
interpreter.public java.lang.String toString()
toString in class java.lang.Object