org.objectweb.asm.util
public class CheckClassAdapter extends ClassAdapter
ClassAdapter that checks that its methods are properly
used. More precisely this class adapter checks each method call individually,
based only on its arguments, but does not check the
sequence of method calls. For example, the invalid sequence
visitField(ACC_PUBLIC, "i", "I", null) visitField(ACC_PUBLIC,
"i", "D", null) will not be detected by this class adapter.
| Constructor Summary | |
|---|---|
| CheckClassAdapter(ClassVisitor cv)
Constructs a new CheckClassAdapter object.
| |
| Method Summary | |
|---|---|
| static void | main(String[] args)
Checks a given class.
|
| void | visit(int version, int access, String name, String superName, String[] interfaces, String sourceFile) |
| void | visitAttribute(Attribute attr) |
| void | visitEnd() |
| void | visitField(int access, String name, String desc, Object value, Attribute attrs) |
| void | visitInnerClass(String name, String outerName, String innerName, int access) |
| CodeVisitor | visitMethod(int access, String name, String desc, String[] exceptions, Attribute attrs) |
CheckClassAdapter object.
Parameters: cv the class visitor to which this adapter must delegate calls.
Usage: CheckClassAdapter <fully qualified class name or class file name>
Parameters: args the command line arguments.
Throws: Exception if the class cannot be found, or if an IO exception occurs.