OME
Class D

java.lang.Object
  |
  +--OME.D

public class D
extends java.lang.Object

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

D

public D()
All the methods of this class are static and thus this class should never be instantiated.
Method Detail

o

public static void o(java.lang.String debugmessage)
Prints a debugging message to the debugging output stream.

o

public static void o(java.lang.Exception e)
Prints a stacktrace for the specified exception, but does not exit the program.
Parameters:
e - the Exception whose stacktrace should be printed out.

fail

public static void fail()
Fail when we don't have an exception to dump.

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.


fail

public static void fail(java.lang.Exception e)
Prints a stacktrace of the specified 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.


a

public static void a(boolean b)
Assert the specified boolean is true and otherwise fail.
Parameters:
b - the boolean value which we want to assert is true.

a

public static void a(long lng)
Assert the specified long value is non-zero and otherwise fail.
Parameters:
lng - the long value which we want to assert is non-zero.

a

public static void a(double dbl)
Assert the specified double value is non-zero and otherwise fail.
Parameters:
dbl - the double value which we want to assert is non-zero.

a

public static void a(java.lang.Object ref)
Assert the specified reference is non-null and otherwise fail.
Parameters:
ref - the reference we want to assert is non-null.

a

public static void a(java.lang.Exception e)
Output a stack trace of the specified Exception and then fail.