|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--OME.D
This class serves as a debugging utility. It contains only static methods
which can be used for debugging purposes such as printing debugging messages
and printing a StackTrace
when an Exception
occurs.
Constructor Summary | |
D()
All the methods of this class are static and thus this class should never be instantiated. |
Method Summary | |
static void |
a(boolean b)
Assert the specified boolean is true and otherwise fail. |
static void |
a(double dbl)
Assert the specified double value is non-zero and otherwise fail. |
static void |
a(java.lang.Exception e)
Output a stack trace of the specified Exception and then
fail. |
static void |
a(long lng)
Assert the specified long value is non-zero and otherwise fail. |
static void |
a(java.lang.Object ref)
Assert the specified reference is non-null and otherwise fail. |
static void |
fail()
Fail when we don't have an exception to dump. |
static void |
fail(java.lang.Exception e)
Prints a stacktrace of the specified Exception . |
static void |
o(java.lang.Exception e)
Prints a stacktrace for the specified exception, but does not exit the program. |
static void |
o(java.lang.String debugmessage)
Prints a debugging message to the debugging output stream. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public D()
Method Detail |
public static void o(java.lang.String debugmessage)
public static void o(java.lang.Exception e)
e
- the Exception
whose stacktrace should be
printed out.public static void fail()
Currently "failing"
does not cause the program to end. This could change in the future.
Once this is done, it makes sense to change the access of this method
from public
to private
.
public static void fail(java.lang.Exception e)
Exception
. We also
would like to take drastic action such as printing a warning message to
exit the program as soon as possible. Currently we don't do this, but
we would like to do this in the future. Probably should use the
JOptionPane.showMessageDialog
to output the warning
message. Once this has been done, it makes sense for the access of
this method to be changed from public
to
private
.
public static void a(boolean b)
b
- the boolean value which we want to assert is true.public static void a(long lng)
lng
- the long value which we want to assert is non-zero.public static void a(double dbl)
dbl
- the double value which we want to assert is non-zero.public static void a(java.lang.Object ref)
ref
- the reference we want to assert is non-null.public static void a(java.lang.Exception e)
Exception
and then
fail.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |