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 String |
name
Name Jython will use to refer to
object . |
private Object |
object
Wrapper around the Java object that is being injected.
|
Constructor and Description |
---|
InjectCommand(Console console,
String name,
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 . |
String |
toString() |
getInputStream
public InjectCommand(Console console, String name, 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 Exception
interpreter
.