Interface IPyFrame
public interface IPyFrame
Abstraction interface for frame information in Python.
-
Method Summary
Modifier and Type Method Description StringgetFilename()Returns the filename of the current frame.intgetLineNumber()Returns the linenumber of the current frame.IPyFramegetParent()Returns the parent frame in the call stack.ObjectgetVariable(String name)Get a variable from the current frame.Map<String,Object>getVariables()Get variables visible from current frame.voidsetVariable(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,
nullshould 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
-