Constructor and Description |
---|
JythonFrame(org.python.core.PyObject frame)
Constructor only stores parameters to member.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFilename()
Returns the filename of the current frame.
|
int |
getLineNumber()
Returns the linenumber of the current frame.
|
IPyFrame |
getParent()
Returns the parent frame in the call stack.
|
java.lang.Object |
getVariable(java.lang.String name)
Get a variable from the current frame.
|
java.util.Map<java.lang.String,java.lang.Object> |
getVariables()
Get variables visible from current frame.
|
void |
setVariable(java.lang.String name,
java.lang.Object value)
Set the content of a variable to a given value.
|
java.lang.String |
toString() |
public JythonFrame(org.python.core.PyObject frame)
frame
- IPyFrame
in Python form.public java.lang.String getFilename()
IPyFrame
Must NOT return null
.
getFilename
in interface IPyFrame
public int getLineNumber()
IPyFrame
getLineNumber
in interface IPyFrame
public IPyFrame getParent()
IPyFrame
If the current frame is the root, null
should be returned.
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object getVariable(java.lang.String name)
IPyFrame
getVariable
in interface IPyFrame
name
- variable name to look upnull
public java.util.Map<java.lang.String,java.lang.Object> getVariables()
IPyFrame
getVariables
in interface IPyFrame
public void setVariable(java.lang.String name, java.lang.Object value)
IPyFrame
setVariable
in interface IPyFrame
name
- name of variable to setvalue
- value to set to