com.futureshocked.debug
Class StaticDebugger

java.lang.Object
  extended by com.futureshocked.debug.StaticDebugger

public class StaticDebugger
extends java.lang.Object

StaticDebugger will print out all the information about an Object passed into it, including private fields with the help of reflection.

It can use recursion to call itself on any objects that are members of the first object passed in, etc etc.


Field Summary
static int defaultMaxDepth
          The default maximum recursion depth for printing.
 
Constructor Summary
StaticDebugger()
           
 
Method Summary
static void printDebugInformation(java.lang.Object o)
          Prints the members of an object, with default recursion depth.
static void printDebugInformation(java.lang.Object o, int maxDepth)
          Prints the members of an object, with user specified max recursion depth.
private static void printDebugInformation(java.lang.Object o, int maxDepth, int currentDepth)
          Private recurisve method that does the actual displaying of the Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultMaxDepth

public static final int defaultMaxDepth
The default maximum recursion depth for printing.

See Also:
Constant Field Values
Constructor Detail

StaticDebugger

public StaticDebugger()
Method Detail

printDebugInformation

public static void printDebugInformation(java.lang.Object o)
Prints the members of an object, with default recursion depth.

Parameters:
o - Object to print out.

printDebugInformation

public static void printDebugInformation(java.lang.Object o,
                                         int maxDepth)
Prints the members of an object, with user specified max recursion depth.

Parameters:
o - Object to print out.
maxDepth - Maximum recursive depth to descend.

printDebugInformation

private static void printDebugInformation(java.lang.Object o,
                                          int maxDepth,
                                          int currentDepth)
Private recurisve method that does the actual displaying of the Object.

Parameters:
o - Object to print out.
maxDepth - Maximum depth to descend.
currentDepth - The current recursive depth.