All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class framework.Debug

java.lang.Object
   |
   +----framework.Debug

public class Debug
extends Object
Help with printing of debug information. Debug information can be printed with method println(). Printing debug information can be enabled or disabled by using the system property "debug".

Version:
$Revision: 1.12 $

Variable Index

 o debugall
If this boolean is true, all printing is enabled, even if debugging is false or the appropriate id in the debuglist is false.
 o debugging
This boolean indicates if printing is enabled or disabled.
 o debugList
A Properties object containing several id's (the property names).

Constructor Index

 o Debug()

Method Index

 o ()
Initialize variable debugging.
 o getDebugging()
 o getDebugging(String)
 o print(Object)
Print debug information.
 o print(String, Object)
Print debug information.
 o println(Object)
Print debug information.
 o println(String, Object)
Print debug information.
 o sleep(long)
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds or less if it is interrupted.

Variables

 o debugging
 private static boolean debugging
This boolean indicates if printing is enabled or disabled. It is set by the static part of this class.

 o debugall
 private static boolean debugall
If this boolean is true, all printing is enabled, even if debugging is false or the appropriate id in the debuglist is false. If debugall is false, all printing functions as normal. It is set by the static part of this class.

 o debugList
 private static Properties debugList
A Properties object containing several id's (the property names). These id's are used by println(String, Object) to determine wether to print or not.

Constructors

 o Debug
 public Debug()

Methods

 o print
 public static void print(Object x)
Print debug information. If printing is enabled, this method calls System.out.print(x), so it can be used just like the print() methods from java.io.PrintStream. If printing is disabled, this method does nothing.

Parameters:
x - the object to print.
See Also:
print
 o print
 public static void print(String id,
                          Object x)
Print debug information. If printing is enabled and the id is found in the debug list, this method calls System.out.print(x), so it can be used just like the print() methods from java.io.PrintStream. If the id is not found, this method does nothing.

Parameters:
id - the id for this call.
x - the object to print.
See Also:
print
 o println
 public static void println(Object x)
Print debug information. If printing is enabled, this method calls System.out.println(x), so it can be used just like the println() methods from java.io.PrintStream. If printing is disabled, this method does nothing.

Parameters:
x - the object to print.
See Also:
println
 o println
 public static void println(String id,
                            Object x)
Print debug information. If printing is enabled and the id is found in the debug list, this method calls System.out.println(x), so it can be used just like the println() methods from java.io.PrintStream. If the id is not found, this method does nothing.

Parameters:
id - the id for this call.
x - the object to print.
See Also:
println
 o getDebugging
 public static boolean getDebugging()
Returns:
the status of the debugging flag. true means printing of debug information is enabled, false means it is disabled.
 o getDebugging
 public static boolean getDebugging(String id)
Returns:
wether debugging for the specified id is enabled or not.
 o sleep
 public static void sleep(long millis)
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds or less if it is interrupted. The thread does not lose ownership of any monitors.

Parameters:
millis - the length of time to sleep in milliseconds.
 o
 static void ()
Initialize variable debugging. It is initialized with the value of system property "debug". Also initialize the debug list with the contents of the file specified by the system property "debugfile".


All Packages  Class Hierarchy  This Package  Previous  Next  Index