|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A set of debugging functions.
Method Summary | |
void |
assert(Object o,
boolean condition,
String n)
Asserts a condition, throws an exception when the expected condition is not met. |
void |
debug(boolean onOff,
String classes)
Turns the debugging output on or off. |
void |
debug(boolean onOff,
String classes,
PrintStream logstream)
Turns the debugging output on or off. |
void |
println(Object o,
String s)
Writes a message to the debugOutputStream if debugging is enabled and the object is included in the list of classes to debug. |
void |
println(String s)
Writes message to the current debugOutputStream if debugging is enabled. |
void |
startTimer(Object obj)
Starts a timer to measure elapsed milliseconds of an event. |
void |
stopTimer(Object obj,
String str)
Stops the timer and prints elapsed milliseconds of an event. |
Method Detail |
public void debug(boolean onOff, String classes) throws IOException
onOff
- true turns debugging on, false turns it offclasses
- the colon-separated list of classes to debug, or
"ALL". The special keyword "STATIC" may be included in the list to
get debugging output for static methods.public void debug(boolean onOff, String classes, PrintStream logstream) throws IOException
onOff
- true turns debugging on, false turns it offclasses
- the list of classes to debug, or "ALL".
The special keyword "STATIC" may be included in the list to get
debugging output for static methods.logstream
- the stream where the debug trace is outputpublic void startTimer(Object obj)
obj
- object to time; null means static timingpublic void stopTimer(Object obj, String str)
obj
- object to time; null for static timingstr
- message to print with outputpublic void println(String s)
s
- the message to printpublic void println(Object o, String s)
If the method calling this method is static, and therefore cannot pass a reference to 'this' as the 'o' argument, it should pass null.
o
- reference to class which is printing this messages
- the message to printpublic void assert(Object o, boolean condition, String n) throws RuntimeException
o
- reference to class which is printing this messagecondition
- the condition which is expected to be truen
- a message to print out when the condition is not met
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |