Interface IPyFrame
public interface IPyFrame
Abstraction interface for frame information in Python.
-
Method Summary
Modifier and Type Method Description 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.Object
getVariable(String name)
Get a variable from the current frame.Map<String,Object>
getVariables()
Get variables visible from current frame.void
setVariable(String name, Object value)
Set the content of a variable to a given value.
-
Method Details
-
getFilename
String getFilename()Returns the filename of the current frame.Must NOT return
null
.- Returns:
- filename for the current frame.
-
getLineNumber
int getLineNumber()Returns the linenumber of the current frame.- Returns:
- line number of the current frame.
-
getParent
IPyFrame getParent()Returns the parent frame in the call stack.If the current frame is the root,
null
should be returned.- Returns:
- Parent in the call stack or
null
-
getVariable
Get a variable from the current frame.- Parameters:
name
- variable name to look up- Returns:
- variable or
null
-
getVariables
Get variables visible from current frame.- Returns:
- variableName -> variableContent
-
setVariable
Set the content of a variable to a given value.- Parameters:
name
- name of variable to setvalue
- value to set to
-