|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--prog.utils.Debug
Method Summary | |
static java.io.PrintWriter |
getPrintWriter()
Returns a PrintWriter, useful for saving exception stack trace to filename. |
static boolean |
isOn()
Returns whether debug has been turned on. |
static void |
off()
Stops Debug.println() statements from writing to file or stdout. |
static void |
on()
Allows Debug.println() statements to write to file or stdout. |
static void |
print(java.lang.String s)
Writes s to file (in style of System.out.print(s)) if debug has been turned on ( Debug.setDebug(true) or
Debug.on() ) and to stdout if display has been
turned on (Debug.setDisplay(true) ). |
static void |
println()
Writes a newline. |
static void |
println(boolean b)
Writes a boolean. |
static void |
println(byte b)
Writes a byte. |
static void |
println(char c)
Writes a char. |
static void |
println(double d)
Writes a double. |
static void |
println(java.lang.Exception e)
Writes the stack trace of e to filename. |
static void |
println(float f)
Writes a float. |
static void |
println(int i)
Writes an int. |
static void |
println(java.lang.String s)
Writes s to file (in style of System.out.println(s)) if debug has been turned on ( Debug.setDebug(true) or
Debug.on() ) and to stdout if display has been
turned on (Debug.setDisplay(true) ). |
static void |
setDebug(boolean state)
Sets whether Debug.println() statements can write to file or stdout. |
static void |
setDisplay(boolean state)
Sets whether Debug.println() statements can write to stdout. |
static void |
setFilename(java.lang.String fname)
Specifies the filename to use for writing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void println(java.lang.Exception e)
public static java.io.PrintWriter getPrintWriter()
println(Exception)
.public static void on()
public static void off()
public static void setDebug(boolean state)
public static void setDisplay(boolean state)
public static boolean isOn()
if (Debug.isOn()) { // code to perform that does not use Debug.println() }
public static void print(java.lang.String s)
Debug.setDebug(true)
or
Debug.on()
) and to stdout if display has been
turned on (Debug.setDisplay(true)
).public static void println(java.lang.String s)
Debug.setDebug(true)
or
Debug.on()
) and to stdout if display has been
turned on (Debug.setDisplay(true)
).public static void println()
println(String)
for similar details.public static void println(int i)
println(String)
for similar details.public static void println(boolean b)
println(String)
for similar details.public static void println(double d)
println(String)
for similar details.public static void println(float f)
println(String)
for similar details.public static void println(char c)
println(String)
for similar details.public static void println(byte b)
println(String)
for similar details.public static void setFilename(java.lang.String fname)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |