S
- the script interfacepublic class DebugSession<S> extends java.lang.Object implements LineNumberConverter
Modifier and Type | Field and Description |
---|---|
static short |
STATE_CONTINUE
The continue state.
|
static short |
STATE_STEP
The step state.
|
Constructor and Description |
---|
DebugSession(DebuggingWrapper<S> wrapper,
SourceModel model) |
DebugSession(DebugSession<?> parentSession,
DebuggingWrapper<S> wrapper,
SourceModel model) |
Modifier and Type | Method and Description |
---|---|
Step |
addBreakpoint(int lineNumber)
Add a breakpoint for a line number, or change the breakpoint to a step.
|
void |
addStep(Step step)
Add a step.
|
void |
continueScript()
Continue the script.
|
void |
endSession()
End a debug session.
|
DebugListener |
getDebugListener()
Return the debug listener.
|
DebugSourceModel |
getDebugSourceModel()
Return the debug source model.
|
short |
getExecutionMode()
Return the execution mode.
|
int |
getLineNumber(int lineNumber,
boolean isException)
Return the effective line number of a line detected in the script runtime.
|
DebugSession<?> |
getParentSession()
Return the parent session.
|
S |
getScript()
Return the script.
|
ScriptProxy<S> |
getScriptProxy()
Return the script proxy.
|
ScriptWrapper<S> |
getScriptWrapper()
Return the script wrapper.
|
SessionHook<S> |
getSessionHook()
Return the session hook.
|
SourceModel |
getSourceModel()
Return the source model.
|
short |
getState()
Return the session state.
|
java.util.SortedMap<java.lang.Integer,Step> |
getSteps()
Return the steps.
|
boolean |
hasBreakpoint(int lineNumber)
Return true if there is a breakpoint on a specified line number.
|
boolean |
hasParentSession()
Return true if there is a parent session.
|
boolean |
hasStep(int lineNumber)
Return true if there is a step on a specified line number.
|
boolean |
isDebugging()
Return true if the debugger is currently in a debug session.
|
void |
setDebugListener(DebugListener debugListener)
Set the debug listener.
|
void |
setDebugSourceModel(DebugSourceModel debugModel)
Set the debug source model.
|
void |
setExecutionMode(short mode)
Set the execution mode.
|
void |
setScriptProxy(ScriptProxy<S> scriptProxy)
Set the ScriptProxy.
|
void |
setSessionHook(SessionHook<S> hook)
Set the session hook.
|
void |
setState(short state)
Set the session state.
|
java.lang.Object |
startScript()
This method must be called when starting the script.
|
java.lang.Object |
startScript(java.lang.Object... args)
This method must be called when starting the script.
|
void |
startSession()
Start a debug session.
|
void |
step(java.lang.Object... args)
Fired when entering a debug step.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLineNumber
public static final short STATE_CONTINUE
public static final short STATE_STEP
public DebugSession(DebuggingWrapper<S> wrapper, SourceModel model)
public DebugSession(DebugSession<?> parentSession, DebuggingWrapper<S> wrapper, SourceModel model)
public void setScriptProxy(ScriptProxy<S> scriptProxy)
scriptProxy
- the ScriptProxypublic void setExecutionMode(short mode)
mode
- the execution modepublic short getExecutionMode()
public void setDebugListener(DebugListener debugListener)
debugListener
- the listenerpublic DebugListener getDebugListener()
public void setSessionHook(SessionHook<S> hook)
hook
- the session hookpublic SessionHook<S> getSessionHook()
public short getState()
public java.lang.Object startScript()
startScript(java.lang.Object...)
with an
empty arguments array.public java.lang.Object startScript(java.lang.Object... args)
args
- the argumentspublic void startSession()
public void endSession()
public boolean isDebugging()
public S getScript()
public ScriptProxy<S> getScriptProxy()
public SourceModel getSourceModel()
public void setDebugSourceModel(DebugSourceModel debugModel)
debugModel
- the debug source modelpublic DebugSourceModel getDebugSourceModel()
public DebugSession<?> getParentSession()
public boolean hasParentSession()
public ScriptWrapper<S> getScriptWrapper()
public void addStep(Step step)
step
- the steppublic int getLineNumber(int lineNumber, boolean isException)
getLineNumber
in interface LineNumberConverter
lineNumber
- the line numberisException
- true for getting the line nulmber for an exceptionpublic java.util.SortedMap<java.lang.Integer,Step> getSteps()
public boolean hasStep(int lineNumber)
lineNumber
- the line numberpublic boolean hasBreakpoint(int lineNumber)
lineNumber
- the line numberpublic Step addBreakpoint(int lineNumber)
lineNumber
- the line numberpublic void continueScript()
public void setState(short state)
state
- the statepublic void step(java.lang.Object... args)
args
- the argumentsCopyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence