org.mozilla.javascript
Class DebuggableEngineImpl
java.lang.Object
|
+--org.mozilla.javascript.DebuggableEngineImpl
- All Implemented Interfaces:
- DebuggableEngine
- public class DebuggableEngineImpl
- extends java.lang.Object
- implements DebuggableEngine
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DebuggableEngineImpl
public DebuggableEngineImpl(Context cx)
setBreakNextLine
public void setBreakNextLine(boolean isLineStep)
- Set whether the engine should break when it encounters
the next line.
The engine will call the attached debugger's handleBreakpointHit
method on the next line it executes if isLineStep is true.
May be used from another thread to interrupt execution.
- Specified by:
setBreakNextLine
in interface DebuggableEngine
- Parameters:
isLineStep
- if true, break next line
getBreakNextLine
public boolean getBreakNextLine()
- Return the value of the breakNextLine flag.
- Specified by:
getBreakNextLine
in interface DebuggableEngine
- Returns:
- true if the engine will break on execution of the
next line.
setDebugger
public void setDebugger(Debugger debugger)
- Set the associated debugger.
- Specified by:
setDebugger
in interface DebuggableEngine
- Parameters:
debugger
- the debugger to be used on callbacks from
the engine.
getDebugger
public Debugger getDebugger()
- Return the current debugger.
- Specified by:
getDebugger
in interface DebuggableEngine
- Returns:
- the debugger, or null if none is attached.
getFrameCount
public int getFrameCount()
- Return the number of frames in current execution.
- Specified by:
getFrameCount
in interface DebuggableEngine
- Returns:
- the count of current frames
getFrame
public DebugFrame getFrame(int frameNumber)
- Return a frame from the current execution.
Frames are numbered starting from 0 for the innermost
frame.
- Specified by:
getFrame
in interface DebuggableEngine
- Parameters:
frameNumber
- the number of the frame in the range
[0,frameCount-1]- Returns:
- the relevant DebugFrame, or null if frameNumber is out
of range or the engine isn't currently saving
frames