|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.scopemvc.util.Debug
A (very simple) general purpose Debug class for assertion checking. e.g.
if (Debug.ON) Debug.assert(thing != null); if (Debug.ON) Debug.assert(thing != null, "thing is null");The ON boolean is a
static final so that setting it to
false and rebuilding the project will strip all debug code from the binaries.
| Field Summary | |
static boolean |
ON
Global debug flag to switch debug code on and off. |
| Method Summary | |
static void |
assertTrue(boolean inCondition)
Test preconditions and postconditions like this (but don't include code in the assertion that changes the state of anything because it'll be stripped in non-debug versions): |
static void |
assertTrue(boolean inCondition,
java.lang.String inMessage)
TODO: document the method |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final boolean ON
static final
for the compiler to dead-strip all debug statements, which must be
prefixed with: if (Debug.ON)
| Method Detail |
public static void assertTrue(boolean inCondition)
if (Debug.ON) Debug.assert(thing != null);
inCondition - TODO: Describe the Parameter
public static void assertTrue(boolean inCondition,
java.lang.String inMessage)
inCondition - TODO: Describe the ParameterinMessage - TODO: Describe the Parameter
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||