|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpnuts.lang.Context
pnuts.tools.DebugContext
public class DebugContext
This class is a Context used in debug mode.
Field Summary |
---|
Fields inherited from class pnuts.lang.Context |
---|
beginColumn, beginLine, defaultErrorStream, defaultOutputStream, defaultTerminalStream, depth, endLine, environment, importEnv, loadingResource, moduleList, provideTable, unitTable |
Constructor Summary | |
---|---|
DebugContext()
|
|
DebugContext(Context context)
|
|
DebugContext(Package pkg)
|
Method Summary | |
---|---|
void |
addCommandListener(CommandListener listener)
|
java.lang.Object |
clone(boolean clear_attributes,
boolean clear_locals,
boolean clear_listeners)
|
protected void |
close(Function f,
java.lang.Object[] args)
Tracks stack depth (function return) in pure interpreter. |
protected int |
getBeginLine()
|
int |
getCallDepth()
Get the stack depth (in pure interpreter) |
Debugger |
getDebugger()
Returns the debugger that controls this debug context |
protected int |
getEndLine()
|
int |
getEvalDepth()
Get the depth of evaluation. |
protected java.lang.Object |
getScriptSource()
Get the source of the script. |
protected void |
onError(java.lang.Throwable t)
This method is called when some exception is thrown. |
protected void |
onExit(java.lang.Object arg)
This method is called when an evaluation is terminated normally. |
protected void |
open(Function f,
java.lang.Object[] args)
Tracks stack depth (function call) in pure interpreter. |
void |
removeCommandListener(CommandListener listener)
|
void |
setDebugger(Debugger debugger)
Registers the specified debugger as the controller of this debug context |
protected void |
updateLine(SimpleNode node,
int beginLine,
int beginColumn)
This method is called when line number is changed. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DebugContext()
public DebugContext(Package pkg)
public DebugContext(Context context)
Method Detail |
---|
public void setDebugger(Debugger debugger)
public Debugger getDebugger()
protected void open(Function f, java.lang.Object[] args)
open
in class Context
protected void close(Function f, java.lang.Object[] args)
close
in class Context
public int getEvalDepth()
public int getCallDepth()
protected int getBeginLine()
protected int getEndLine()
protected java.lang.Object getScriptSource()
Context
getScriptSource
in class Context
java.net.URL object, when the script is not precompiled pnuts.lang.Runtime object, when the script is precompiled
protected void updateLine(SimpleNode node, int beginLine, int beginColumn)
updateLine
in class Context
node
- the current AST nodebeginLine
- the line number at which the current expression starts.beginColumn
- the column number at which theh current expression ends.protected void onError(java.lang.Throwable t)
onError
in class Context
protected void onExit(java.lang.Object arg)
onExit
in class Context
public void addCommandListener(CommandListener listener)
public void removeCommandListener(CommandListener listener)
public java.lang.Object clone(boolean clear_attributes, boolean clear_locals, boolean clear_listeners)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |