lapisx.util
Class Debug.Quiet

java.lang.Object
  extended bylapisx.util.Debug
      extended bylapisx.util.Debug.Verbose
          extended bylapisx.util.Debug.Quiet
Enclosing class:
Debug

public static class Debug.Quiet
extends Debug.Verbose

Debug object that only prints exception stack traces and assertion failures. No other debug messages are printed. Assertion failures only print a report, without throwing an exception. This object is a good default debug level, even for released code.

If you want to print to System.err, just use the singleton instance Debug.QUIET rather than constructing a new Debug.Quiet instance.


Nested Class Summary
 
Nested classes inherited from class lapisx.util.Debug
Debug.NoDebug, Debug.Quiet, Debug.Verbose
 
Field Summary
 
Fields inherited from class lapisx.util.Debug.Verbose
out
 
Fields inherited from class lapisx.util.Debug
NONE, QUIET, VERBOSE
 
Constructor Summary
Debug.Quiet()
          Makes a Quiet debug object that sends exception reports to System.err.
Debug.Quiet(PrintStream out)
          Makes a Quiet debug object that sends exception reports 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.
 void print(Object message)
          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 message)
          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.Verbose
getOutputStream
 
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
 

Constructor Detail

Debug.Quiet

public Debug.Quiet()
Makes a Quiet debug object that sends exception reports to System.err.


Debug.Quiet

public Debug.Quiet(PrintStream out)
Makes a Quiet debug object that sends exception reports to the given stream.

Parameters:
out - stream to receive exception reports.
Method Detail

printEnabled

public boolean printEnabled()
Description copied from class: Debug
Test whether calling print() or println() on this debug object will print anything.

Overrides:
printEnabled in class Debug.Verbose

reportEnabled

public boolean reportEnabled()
Description copied from class: Debug
Test whether calling report() on this debug object will print anything.

Overrides:
reportEnabled in class Debug.Verbose

assertionEnabled

public boolean assertionEnabled()
Description copied from class: Debug
Test whether calling assertion() on this debug object will do anything.

Overrides:
assertionEnabled in class Debug.Verbose

print

public void print(String message)
Description copied from class: Debug
Print message (if this is enabled for printing)

Overrides:
print in class Debug.Verbose

println

public void println(String message)
Description copied from class: Debug
Print message (if this is enabled for printing)

Overrides:
println in class Debug.Verbose

print

public void print(Object message)
Description copied from class: Debug
Print an object (if this is enabled for printing)

Overrides:
print in class Debug.Verbose

println

public void println(Object message)
Description copied from class: Debug
Print an object (if this is enabled for printing)

Overrides:
println in class Debug.Verbose

report

public void report(Throwable t)
Description copied from class: Debug
Print the stack trace of an exception (if this is enabled for reporting exceptions)

Overrides:
report in class Debug.Verbose

printThreadInfo

public void printThreadInfo()
Description copied from class: Debug
Print a list of active threads (if this is enabled for printing)

Overrides:
printThreadInfo in class Debug.Verbose

printStackTrace

public void printStackTrace()
Description copied from class: Debug
Print stack trace of current execution point (if this is enabled for debugging printing)

Overrides:
printStackTrace in class Debug.Verbose

assertion

public void assertion(boolean f)
Description copied from class: Debug
Test an assertion (if this is enabled for assertions)

Overrides:
assertion in class Debug.Verbose