Class Dim.StackFrame
- java.lang.Object
-
- org.mozilla.javascript.tools.debugger.Dim.StackFrame
-
- All Implemented Interfaces:
DebugFrame
- Enclosing class:
- Dim
public static class Dim.StackFrame extends java.lang.Object implements DebugFrame
Object to represent one stack frame.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Dim.ContextData
contextData()
Returns the ContextData object for the Context.java.lang.String
getFunctionName()
Returns the current function name.int
getLineNumber()
Returns the current line number.java.lang.String
getUrl()
Returns the source URL.void
onDebuggerStatement(Context cx)
Called when a 'debugger' statement is executed.void
onEnter(Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
Called when the stack frame is entered.void
onExceptionThrown(Context cx, java.lang.Throwable exception)
Called when an exception has been thrown.void
onExit(Context cx, boolean byThrow, java.lang.Object resultOrException)
Called when the stack frame has been left.void
onLineChange(Context cx, int lineno)
Called when the current position has changed.java.lang.Object
scope()
Returns the scope object for this frame.Dim.SourceInfo
sourceInfo()
Returns the SourceInfo object for the function.java.lang.Object
thisObj()
Returns the 'this' object for this frame.
-
-
-
Method Detail
-
onEnter
public void onEnter(Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
Called when the stack frame is entered.- Specified by:
onEnter
in interfaceDebugFrame
- Parameters:
cx
- current Context for this threadscope
- the activation scope for the function or script.thisObj
- value of the JavaScriptthis
objectargs
- the array of arguments
-
onLineChange
public void onLineChange(Context cx, int lineno)
Called when the current position has changed.- Specified by:
onLineChange
in interfaceDebugFrame
- Parameters:
cx
- current Context for this threadlineno
- current line number in the script source
-
onExceptionThrown
public void onExceptionThrown(Context cx, java.lang.Throwable exception)
Called when an exception has been thrown.- Specified by:
onExceptionThrown
in interfaceDebugFrame
- Parameters:
cx
- current Context for this threadexception
- exception object
-
onExit
public void onExit(Context cx, boolean byThrow, java.lang.Object resultOrException)
Called when the stack frame has been left.- Specified by:
onExit
in interfaceDebugFrame
- Parameters:
cx
- current Context for this threadbyThrow
- if true function will leave by throwing exception, otherwise it will execute normal returnresultOrException
- function result in case of normal return or exception object if about to throw exception
-
onDebuggerStatement
public void onDebuggerStatement(Context cx)
Called when a 'debugger' statement is executed.- Specified by:
onDebuggerStatement
in interfaceDebugFrame
- Parameters:
cx
- current Context for this thread
-
sourceInfo
public Dim.SourceInfo sourceInfo()
Returns the SourceInfo object for the function.
-
contextData
public Dim.ContextData contextData()
Returns the ContextData object for the Context.
-
scope
public java.lang.Object scope()
Returns the scope object for this frame.
-
thisObj
public java.lang.Object thisObj()
Returns the 'this' object for this frame.
-
getUrl
public java.lang.String getUrl()
Returns the source URL.
-
getLineNumber
public int getLineNumber()
Returns the current line number.
-
getFunctionName
public java.lang.String getFunctionName()
Returns the current function name.
-
-