|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.util.Debug
public final class Debug
This class generalizes the debug output by providing additional
functionality to the System.out.println output, such as enabling, disabling
debug or indenting the output.
All methods and fields are declared as static to simplify use.
Indentation can be used to perform stack traces of the methods order of execution.
This class is intended to duplicate the C/C++ macro IFDEF functionality.
All debug routines will only be included in the compiled classes if
debugging is enabled via the ENABLE_DEBUG flag. If this flag is enabled,
most compilers, though not neccessary all, will simply ignore any
references to the Debug class. ENABLE_DEBUG flag cannot be changed during
runtime.
Field Summary | |
---|---|
static boolean |
ENABLE_DEBUG
|
Constructor Summary | |
---|---|
Debug()
|
Method Summary | |
---|---|
static void |
end(java.lang.String s)
Creates indented debug output. |
static void |
main(java.lang.String[] args)
Run test applet. |
static void |
out(java.lang.Object source,
java.lang.String s)
Outputs the debug string and class name if debug output is enabled. |
static void |
out(java.lang.String s)
Outputs the debug string if debug output is enabled. |
static void |
out(java.lang.Throwable throwable)
Outputs the exception message if debug output is enabled. |
static void |
start(java.lang.String s)
Creates indented debug output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean ENABLE_DEBUG
Constructor Detail |
---|
public Debug()
Method Detail |
---|
public static final void out(java.lang.String s)
s
- String to output.public static final void out(java.lang.Throwable throwable)
throwable
- Exception to display.public static final void out(java.lang.Object source, java.lang.String s)
source
- Instance of object that generated this output.s
- String to output.public static final void start(java.lang.String s)
s
- String to output.public static final void end(java.lang.String s)
s
- String to output.public static void main(java.lang.String[] args)
args
- command line parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |