|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.aspects.tracing.Debugger
This class is a simple debugger that can by used by a program to step the called methods and print some informations.
It is used by the debugging wrapper.
DebuggingWrapper
,
DebuggingWrapper.step(Interaction)
Field Summary | |
int |
mode
Store the current debugging mode. |
static int |
STEP
Constant for stepping. |
static int |
STEP_INTO
Constant for stepping into |
Stack |
stepIntoStack
A stack that allows step into to stop. |
boolean |
stepping
Store if the debugger must step or not. |
Constructor Summary | |
Debugger()
The debugger constructor. |
Method Summary | |
void |
disableStepping()
Disable stepping. |
void |
enableStepping()
Enable stepping If this method is called and that the stepping was disabled, the debugger enters a stepping mode. |
void |
endOfMethod(String container,
String objectName,
String method,
Object[] args,
Object ret,
long executionTime)
This must be called at the end of a stepped method to print the execution informations of the method. |
int |
getDebuggingMode()
The getter for the debugging mode. |
boolean |
isStepping()
Tell if in stepping mode. |
void |
setDebuggingMode(int mode)
Set the debugging mode of the debugger. |
void |
startOfMethod(String container,
String objectName,
String method,
Object[] args)
Must be called when a new method is called. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int STEP
public static final int STEP_INTO
public int mode
public boolean stepping
public transient Stack stepIntoStack
Constructor Detail |
public Debugger()
Method Detail |
public void setDebuggingMode(int mode)
mode
- the new modegetDebuggingMode()
public int getDebuggingMode()
setDebuggingMode(int)
public void disableStepping()
If this method is called, the debugger enters a run mode but is still active (a stepping mode can be recovered).
isStepping()
,
enableStepping()
public void enableStepping()
If this method is called and that the stepping was disabled, the debugger enters a stepping mode.
isStepping()
,
disableStepping()
public boolean isStepping()
enableStepping()
,
disableStepping()
public void startOfMethod(String container, String objectName, String method, Object[] args)
If the debugger is in step mode, then, the program stops and the user is asked to press a key to continue.
container
- the name of the container that runs the methodobjectName
- the name of the called objectmethod
- the name of the called methodargs
- the arguments of the called methodpublic void endOfMethod(String container, String objectName, String method, Object[] args, Object ret, long executionTime)
container
- the name of the container that runs the methodobjectName
- the name of the called objectmethod
- the name of the called methodargs
- the arguments of the called methodret
- the value returned by the called methodexecutionTime
- the method call duration
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |