|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
ApplicationDebugger | ApplicationDebugger provides an easy way to intercept and modify
classes for debugging purposes. To debug an application, a class name and a String array of arguments are passed in the constuctor, methods to intercept are specified using the addMethod() methods, and finally run() is called, which will invoke main() on the user specified class. |
ClassTransforms | A contain for InterceptedMethod , which also has boolean
methods that will let DebuggerClassLoader know if a class should
be modified, and DebuggerClassVisitor know if a method should be
modified. |
DebuggerClassLoader | ClassLoader that allows for easy debugging of classes. |
DebuggerClassVisitor | An org.objectweb.asm.ClassAdapter that will modify classes as needed. |
InterceptedMethod | InterceptedMethod contains the class name, method name, method description, and information relating to which code modifications should be done to this method. |
MethodDescriptionUtil | Small utility class that will parse a code style method declaration and populate instance variables with the class name, method, and description. |
Provides a way to debug classes, using the ASM framework to dynamically modify classes upon loading.
Currently two facilities for debugging are available - the printing of all class members recursively, and the ability to limit the depth of recurisve methods.
The easiest way to start using this is to simply run ApplicationDebugger
with the the appropriate arguments (make sure to include the full name, with package, of all classes). For example:
java com.futureshocked.classloader.ApplicationDebugger ClassWithMainMethod "void com.user.package.ClassYouWishToDebug.methodToDebug(java.lang.String arg1, int arg2)" (any arguments for main method)
For more control, make a new ApplicationDebugger instance and call the appropriate methods:
ApplicationDebugger ad = new ApplicationDebugger(String classWithMainMethod, String[] argsForMainMethod); ad.setVerbose(true); // print debugging information InterceptedMethod im = ad.addCodeStyleMethod( "java.lang.String com.my.package.TestClass.testMethod(int arg1)", true, true); im.setRecursionLimiter(30); // max recursive depth of 30 im.removeStaticDebuggerCall(); // instead, could have used false for first boolean above ad.run();
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |