org.apache.bsf.debug.meta

Class JsEngineStub

public class JsEngineStub extends Stub implements JsEngine

Constructor Summary
JsEngineStub(SocketConnection con, int tid, int uid)
Method Summary
Objecteval(String docname, String fnOrScript, int lineno)
Allow the debugger to evaluate an expression within the current context.
JsContextgetContext(int depth)
Returns the JsContext at a certain depth.
intgetContextCount()
Returns the count of JsContext on the current stack.
JsCallbacksgetDebugger()
Return the current debugger.
JsObjectgetGlobalObject()
Any execution in JavaScript happen with respect to a global object, sort of the top-level name space for properties.
StringgetThread()
StringgetThreadGroup()
JsObjectgetUndefinedValue()
As per ECMA specification, each JavaScript execution defines a unique object for the undefined value.
booleanisSuspended()
booleanpoll()
voidrun()
Stepping commands: run: resume execution until it finishes or a breakpoint is hit. stepIn: steps to the next statement, considering callee's statement if any. stepOut: steps until the current JsContext exits. stepOver: steps to the next statement within the same JsContext.
voidsetDebugger(JsCallbacks debugger)
Set the associated debugger.
voidstepIn()
voidstepOut()
voidstepOver()

Constructor Detail

JsEngineStub

public JsEngineStub(SocketConnection con, int tid, int uid)

Method Detail

eval

public Object eval(String docname, String fnOrScript, int lineno)
Allow the debugger to evaluate an expression within the current context.

getContext

public JsContext getContext(int depth)
Returns the JsContext at a certain depth. Depth zero is the top of the stack, that is, the inner execution context. This is a valid call only if the engine is stopped in a callback to the debugger (breakpoint or stepping completed).

getContextCount

public int getContextCount()
Returns the count of JsContext on the current stack. This is a valid call only if the engine is stopped in a callback to the debugger (breakpoint or stepping completed).

getDebugger

public JsCallbacks getDebugger()
Return the current debugger.

Returns: the debugger, or null if none is attached.

getGlobalObject

public JsObject getGlobalObject()
Any execution in JavaScript happen with respect to a global object, sort of the top-level name space for properties. This is global object return by this call.

getThread

public String getThread()

getThreadGroup

public String getThreadGroup()

getUndefinedValue

public JsObject getUndefinedValue()
As per ECMA specification, each JavaScript execution defines a unique object for the undefined value.

isSuspended

public boolean isSuspended()

poll

public boolean poll()

run

public void run()
Stepping commands: run: resume execution until it finishes or a breakpoint is hit. stepIn: steps to the next statement, considering callee's statement if any. stepOut: steps until the current JsContext exits. stepOver: steps to the next statement within the same JsContext.

setDebugger

public void setDebugger(JsCallbacks debugger)
Set the associated debugger.

Parameters: debugger the debugger to be used on callbacks from the engine.

stepIn

public void stepIn()

stepOut

public void stepOut()

stepOver

public void stepOver()