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 $
-
debugall
- If this boolean is true, all printing is enabled, even if
debugging is false or the appropriate id in the debuglist is
false.
-
debugging
- This boolean indicates if printing is enabled or disabled.
-
debugList
- A Properties object containing several id's (the property names).
-
Debug()
-
-
()
- Initialize variable
debugging
.
-
getDebugging()
-
-
getDebugging(String)
-
-
print(Object)
- Print debug information.
-
print(String, Object)
- Print debug information.
-
println(Object)
- Print debug information.
-
println(String, Object)
- Print debug information.
-
sleep(long)
-
Causes the currently executing thread to sleep (temporarily cease
execution) for the specified number of milliseconds or less if it is
interrupted.
debugging
private static boolean debugging
- This boolean indicates if printing is enabled or disabled. It
is set by the static part of this class.
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.
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.
Debug
public Debug()
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
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
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
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
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.
getDebugging
public static boolean getDebugging(String id)
- Returns:
- wether debugging for the specified id is enabled or not.
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.
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