|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ix.util.Debug
Class for useful static debugging tools
Field Summary | |
static boolean |
on
Global on/off control over the debugging output produced by the note and noteln methods. |
static java.io.PrintStream |
out
The output destination used by note and noteln. |
Method Summary | |
static void |
assert(boolean cond)
assert checks a condition that should always be true and throws an AssertionFailure if it is not. |
static void |
assert(boolean cond,
java.lang.String message)
A variant that allows a message that describes the assertion. |
static void |
assert(boolean cond,
java.lang.String message,
java.lang.Object item)
A variant that allows a message that describes the assertion plus an Object that the message is about. |
static void |
error(java.lang.String message)
Use this to tell the user about problems that should not be ignored and are not handled locally. |
static void |
note(java.lang.String message)
note writes a string to Debug.out if Debug.on is true. |
static void |
noteElements(java.util.Enumeration e,
java.lang.String prefix)
Prints the elements of an enumeration on separate lines with a specified prefix at the start of each line. |
static void |
noteEnumeration(java.util.Enumeration e)
Numbers and prints the elements of an Enumeration on separate lines. |
static void |
noteEnumerationClasses(java.util.Enumeration e)
Prints the elements of an Enumeration on separate lines, with an index number and and class name at the start of each line. |
static void |
noteException(java.lang.Exception e)
Note an exception, together with a backtrace. |
static void |
noteException(java.lang.Exception e,
boolean backtrace)
Note an exception, optionally with a backtrace. |
static void |
noteln(java.lang.String message)
noteln writes a string, followed by a newline, to Debug.out if Debug.on is true. |
static void |
noteln(java.lang.String message,
int i)
|
static void |
noteln(java.lang.String message,
java.lang.Object whatever)
|
static void |
setNoteFile(java.lang.String filename)
Sets the output destination for debugging notes. |
static void |
setNoteStream(java.io.PrintStream s)
Sets the output destination for debugging notes. |
static void |
warn(java.lang.String message)
Use this to tell the user about minor problems. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static boolean on
public static java.io.PrintStream out
Method Detail |
public static void note(java.lang.String message)
Unlike noteln, note does not print a newline after the message and does not have variants that take different arguments. The typical use of note is to use several calls to write a line of output. One potential problem with using note is that a different thread may print some other output between those calls.
public static void noteln(java.lang.String message)
public static void noteln(java.lang.String message, java.lang.Object whatever)
public static void noteln(java.lang.String message, int i)
public static void setNoteStream(java.io.PrintStream s)
public static void setNoteFile(java.lang.String filename)
public static void noteException(java.lang.Exception e)
public static void noteException(java.lang.Exception e, boolean backtrace)
public static void warn(java.lang.String message)
public static void error(java.lang.String message)
java.lang.RuntimeException
- as notification of the problem.public static void noteEnumeration(java.util.Enumeration e)
public static void noteEnumerationClasses(java.util.Enumeration e)
public static void noteElements(java.util.Enumeration e, java.lang.String prefix)
public static void assert(boolean cond)
AssertionFailure is a RuntimeException and so does not need to be listed in the "throws" clauses of method definitions. One reason for that is to avoid discouraging the use of assertions. If AssertionFailure had to be declared, then adding an assertion in a method that had none before would require nonlocal changes in the code.
AssertionFailure
- as notification of the problemAssertionFailure
public static void assert(boolean cond, java.lang.String message)
public static void assert(boolean cond, java.lang.String message, java.lang.Object item)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |