|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.util.D
Provides some convenience methods for code debugging and exception handling.
The behaviour of this class can be adapted by starting
the Java Virtual Machine with a set system property
y.debug
and y.debug.level
.
The default debug level is 2. It can be changed by
setting the system property y.debug.level
appropriately.
Field Summary | |
static int |
DEBUG_LEVEL
The debug level threshold. |
Constructor Summary | |
D()
|
Method Summary | |
static void |
bu(int level,
String output)
Like bug but uses no linefeed. |
static void |
bu(Object msg)
Like bug, but omits newline |
static void |
bu(Object source,
Object msg)
Like D.bug , but does not append a newline to the output |
static void |
bug(int level,
String msg)
Prints the given string to System.out if
the given debug level if bigger than
DEBUG_LEVEL |
static void |
bug(Object msg)
Prints the given object to System.err unconditionally. |
static void |
bug(Object source,
int level,
Object msg)
Print the given message to System.err if the fully qualified
class name of the given source object is encoded
in the system property y.debug .
|
static void |
bug(Object source,
Object msg)
Print the given message to System.err if the fully qualified
class name of the given source object is encoded
in the system property y.debug and
if the given debug level if bigger than
DEBUG_LEVEL .
|
static void |
fatal(Object msg)
Called on a fatal error. |
static void |
fatal(Object source,
Object msg)
Outputs the class of the given object and the given message. |
static void |
show(Exception ex)
Displays the stack trace generated by the given exception in a dialog window. |
static void |
showError(Object obj)
Displays the string representation of the given object in a dialog window. |
static void |
trace()
Outputs a stack trace on System.err |
static void |
trace(Exception ex)
Outputs a stack trace on System.err |
static boolean |
watch(String source)
Returns true if the given object type is under observation due to the -Dy.debug=... |
static boolean |
watchSource(Object source)
Returns true if the given object type is under observation due to the -Dy.debug=... |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEBUG_LEVEL
y.debug.level
.
Constructor Detail |
public D()
Method Detail |
public static final void bug(int level, String msg)
System.out
if
the given debug level if bigger than
DEBUG_LEVEL
public static final void bug(Object msg)
System.err
unconditionally.
public static final void bu(Object msg)
public static final void bug(Object source, Object msg)
System.err
if the fully qualified
class name of the given source object is encoded
in the system property y.debug
and
if the given debug level if bigger than
DEBUG_LEVEL
.
The value of the y.debug
property is a colon separated
list of fully qualified class name prefixes. If the name of the given
class starts with one of the specifed prefixes the debug message will
be printed to System.err
public static final void bug(Object source, int level, Object msg)
System.err
if the fully qualified
class name of the given source object is encoded
in the system property y.debug
.
The value of the y.debug
property is a colon separated
list of fully qualified class name prefixes. If the name of the given
class starts with one of the specifed prefixes the debug message will
be printed to System.err
public static final void bu(Object source, Object msg)
D.bug
, but does not append a newline to the output
public static boolean watchSource(Object source)
-Dy.debug=...
mechanism.
public static boolean watch(String source)
-Dy.debug=...
mechanism.
public static final void fatal(Object source, Object msg)
Mostly used in a catch statement to signal a definite bug.
public static final void fatal(Object msg)
public static final void bu(int level, String output)
public static void trace(Exception ex)
public static void trace()
public static void showError(Object obj)
public static void show(Exception ex)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |