com.darwinsys.util
Class Debug

java.lang.Object
  |
  +--com.darwinsys.util.Debug

public class Debug
extends java.lang.Object

Utilities for debugging


Constructor Summary
Debug()
           
 
Method Summary
static boolean isEnabled(java.lang.String category)
          Static method to see if a given category of debugging is enabled.
static void println(java.lang.String category, java.lang.Object stuff)
          Same thing but for non-String objects (think of the other form as an optimization of this).
static void println(java.lang.String category, java.lang.String msg)
          Static method to println a given message if the given category is enabled for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Debug

public Debug()
Method Detail

isEnabled

public static boolean isEnabled(java.lang.String category)
Static method to see if a given category of debugging is enabled. Enable by setting e.g., -Ddebug.fileio to debug file I/O operations. Use like this:
if (Debug.isEnabled("fileio"))
System.out.println("Starting to read file " + fileName);

println

public static void println(java.lang.String category,
                           java.lang.String msg)
Static method to println a given message if the given category is enabled for debugging.

println

public static void println(java.lang.String category,
                           java.lang.Object stuff)
Same thing but for non-String objects (think of the other form as an optimization of this).