ApplicationDebugger - takes care of setting up ClassLoader and invoking main() DebuggerClassLoader - loads the requested class, if class should be modified attaches a DebuggerClassVisitor to it. DebuggerClassVisitor - adds necessary bytecode to the methods that need modifications, adds new fields to classes that require them. InterceptedMethod - Object that represents a method to be intercepted - contains data about class name, method name, method description, and what code should be added to the method. ClassTransforms - Container of InterceptedMethods - uses HashMap to let the ClassLoader know if a class needs to be modified (speed). StaticDebugger - Uses reflection to print out all fields of an Object.
Example usage: ApplicationDebugger ad = new ApplicationDebugger(String classWithMainMethod, String[] argsForMainMethod); ad.setVerbose(true); // print debugging information //addCodeStyleMethod(String code, boolean callStaticDebug, boolean limitRecursion) InterceptedMethod im = ad.addCodeStyleMethod( "java.lang.String com.my.package.TestClass.testMethod(int arg1)", false, true); im.setRecursionLimiter(30); // max recursive depth of 30 ad.run();