simkin
Class StackFrame

java.lang.Object
  |
  +--simkin.StackFrame

public class StackFrame
extends java.lang.Object

This class stores information about the where the current script is executing. This class is used internally by the Interpreter, you do not normally need to use it.


Constructor Summary
StackFrame(java.lang.String location, java.lang.Object obj, java.util.Hashtable vars, ExecutableContext ctxt)
          Constructor
 
Method Summary
 ExecutableContext getContext()
          returns the context within which the stack frame is executing
 int getLineNum()
          returns the current line number
 java.lang.String getLocation()
          returns the location of the code being executed in this stack frame
 java.lang.Object getObject()
          returns the object owning the stack frame
 StackFrame getParentFrame()
          returns the parent frame of this one
 java.util.Hashtable getVars()
          returns the local variables for this stack frame
 void setLineNum(int line_num)
          updates the line number for the frame
 void setParentFrame(StackFrame frame)
          sets the parent frame of this frame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackFrame

public StackFrame(java.lang.String location,
                  java.lang.Object obj,
                  java.util.Hashtable vars,
                  ExecutableContext ctxt)
Constructor

Parameters:
location - the name of the source file
obj - the object owning the script
vars - the local variables at this part of the script
ctxt - the current ExecutableContext
Method Detail

setLineNum

public void setLineNum(int line_num)
updates the line number for the frame

Parameters:
line_num - the new line number

getLineNum

public int getLineNum()
returns the current line number

Returns:
the current line number in the script

getLocation

public java.lang.String getLocation()
returns the location of the code being executed in this stack frame

Returns:
the current name of the script

getContext

public ExecutableContext getContext()
returns the context within which the stack frame is executing

Returns:
the owning ExecutableContext

getObject

public java.lang.Object getObject()
returns the object owning the stack frame

Returns:
the owning object

getVars

public java.util.Hashtable getVars()
returns the local variables for this stack frame

Returns:
the current local variables

getParentFrame

public StackFrame getParentFrame()
returns the parent frame of this one

Returns:
the StackFrame that called this one

setParentFrame

public void setParentFrame(StackFrame frame)
sets the parent frame of this frame

Parameters:
frame - set the parent stack frame