|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.utils.DebugUtils
public class DebugUtils
Debug utilities.
This static class provides various utility methods for printing debugging information.
| Constructor Summary | |
|---|---|
protected |
DebugUtils()
Don't allow instantiation, do allow overrides. |
| Method Summary | |
|---|---|
static java.lang.String |
activeThreads()
Get list of active threads. |
static java.lang.String |
getStackTrace(java.lang.Throwable e)
Gets a stack trace for an exception. |
static void |
printArray(java.lang.String arrayLabel,
java.lang.Object[] array)
Debugging support -- Print contents of an array. |
static java.awt.Component |
printChildComponents(java.awt.Container parent,
int indent)
Prints child components of a component. |
static void |
printMap(java.lang.String mapLabel,
java.util.Map map)
Debugging support -- Print contents of a map (HashMap, TreeMap, etc.). |
static void |
printMemoryStatus(java.lang.String title)
Print current memory status. |
static void |
printNullity(java.lang.String methodName,
java.lang.String objectName,
java.lang.Object object)
Debugging support -- Print message to System.out telling if object is null or not. |
static void |
printThreads()
Prints current thread list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DebugUtils()
| Method Detail |
|---|
public static java.lang.String activeThreads()
public static java.lang.String getStackTrace(java.lang.Throwable e)
e - The exception
public static java.awt.Component printChildComponents(java.awt.Container parent,
int indent)
parent - The parent component.
public static void printNullity(java.lang.String methodName,
java.lang.String objectName,
java.lang.Object object)
methodName - Name of calling method.objectName - Name of object to inspect.object - The named object to inspect.
public static void printMap(java.lang.String mapLabel,
java.util.Map map)
mapLabel - Label for map.map - The map to print.
N.B. This method assumes both the keys and values have toString() methods.
public static void printArray(java.lang.String arrayLabel,
java.lang.Object[] array)
arrayLabel - Label for array.array - The array to print.
N.B. This method assumes the array values have toString() methods.
public static void printMemoryStatus(java.lang.String title)
public static void printThreads()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||