|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlapisx.util.Debug
lapisx.util.Debug.Verbose
Debug object that prints all messages, exception stack traces, and checks all assertions. Useful during test and debug.
If you want to print to System.err, just use the singleton instance Debug.VERBOSE rather than constructing a new Debug.Verbose instance.
Nested Class Summary |
Nested classes inherited from class lapisx.util.Debug |
Debug.NoDebug, Debug.Quiet, Debug.Verbose |
Field Summary | |
protected PrintStream |
out
|
Fields inherited from class lapisx.util.Debug |
NONE, QUIET, VERBOSE |
Constructor Summary | |
Debug.Verbose()
Makes a Verbose debug object that prints to System.err. |
|
Debug.Verbose(PrintStream out)
Makes a Verbose debug object that prints to the given stream. |
Method Summary | |
void |
assertion(boolean f)
Test an assertion (if this is enabled for assertions) |
boolean |
assertionEnabled()
Test whether calling assertion() on this debug object will do anything. |
OutputStream |
getOutputStream()
Returns the OutputStream associated with this debug object. |
void |
print(Object obj)
Print an object (if this is enabled for printing) |
void |
print(String message)
Print message (if this is enabled for printing) |
boolean |
printEnabled()
Test whether calling print() or println() on this debug object will print anything. |
void |
println(Object obj)
Print an object (if this is enabled for printing) |
void |
println(String message)
Print message (if this is enabled for printing) |
void |
printStackTrace()
Print stack trace of current execution point (if this is enabled for debugging printing) |
void |
printThreadInfo()
Print a list of active threads (if this is enabled for printing) |
void |
report(Throwable t)
Print the stack trace of an exception (if this is enabled for reporting exceptions) |
boolean |
reportEnabled()
Test whether calling report() on this debug object will print anything. |
Methods inherited from class lapisx.util.Debug |
getDebugLevel, setDebugLevel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PrintStream out
Constructor Detail |
public Debug.Verbose()
public Debug.Verbose(PrintStream out)
out
- stream that will receive debugging output from this object.Method Detail |
public boolean printEnabled()
Debug
printEnabled
in class Debug
public boolean reportEnabled()
Debug
reportEnabled
in class Debug
public boolean assertionEnabled()
Debug
assertionEnabled
in class Debug
public void print(String message)
Debug
print
in class Debug
message
- message to printpublic void println(String message)
Debug
println
in class Debug
message
- message to printpublic void print(Object obj)
Debug
print
in class Debug
obj
- object to printpublic void println(Object obj)
Debug
println
in class Debug
obj
- object to printpublic void report(Throwable t)
Debug
report
in class Debug
t
- exceptionpublic void printThreadInfo()
Debug
printThreadInfo
in class Debug
public void printStackTrace()
Debug
printStackTrace
in class Debug
public void assertion(boolean f)
Debug
assertion
in class Debug
f
- result of assertion expressionpublic OutputStream getOutputStream()
Debug
getOutputStream
in class Debug
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |