| java.lang.Object com.tc.asm.ClassAdapter com.tc.asm.util.CheckClassAdapter
CheckClassAdapter | public class CheckClassAdapter extends ClassAdapter (Code) | | A
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.
author: Eric Bruneton |
Method Summary | |
static void | checkAccess(int access, int possibleAccess) Checks that the given access flags do not contain invalid flags. | public static void | main(String[] args) Checks a given class. | public static void | verify(ClassReader cr, boolean dump, PrintWriter pw) | public void | visit(int version, int access, String name, String signature, String superName, String[] interfaces) | public AnnotationVisitor | visitAnnotation(String desc, boolean visible) | public void | visitAttribute(Attribute attr) | public void | visitEnd() | public FieldVisitor | visitField(int access, String name, String desc, String signature, Object value) | public void | visitInnerClass(String name, String outerName, String innerName, int access) | public MethodVisitor | visitMethod(int access, String name, String desc, String signature, String[] exceptions) | public void | visitOuterClass(String owner, String name, String desc) | public void | visitSource(String file, String debug) |
CheckClassAdapter | public CheckClassAdapter(ClassVisitor cv)(Code) | | Constructs a new
CheckClassAdapter .
Parameters: cv - the class visitor to which this adapter must delegate calls. |
checkAccess | static void checkAccess(int access, int possibleAccess)(Code) | | Checks that the given access flags do not contain invalid flags. This
method also checks that mutually incompatible flags are not set
simultaneously.
Parameters: access - the access flags to be checked Parameters: possibleAccess - the valid access flags. |
main | public static void main(String[] args) throws Exception(Code) | | Checks a given class. 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 exceptionoccurs. |
verify | public static void verify(ClassReader cr, boolean dump, PrintWriter pw)(Code) | | Checks a given class
Parameters: cr - a ClassReader that contains bytecode for theanalysis. Parameters: dump - true if bytecode should be printed out not only when errorsare found. Parameters: pw - write where results going to be printed |
visitEnd | public void visitEnd()(Code) | | |
Methods inherited from com.tc.asm.ClassAdapter | public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)(Code)(Java Doc) public AnnotationVisitor visitAnnotation(String desc, boolean visible)(Code)(Java Doc) public void visitAttribute(Attribute attr)(Code)(Java Doc) public void visitEnd()(Code)(Java Doc) public FieldVisitor visitField(int access, String name, String desc, String signature, Object value)(Code)(Java Doc) public void visitInnerClass(String name, String outerName, String innerName, int access)(Code)(Java Doc) public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)(Code)(Java Doc) public void visitOuterClass(String owner, String name, String desc)(Code)(Java Doc) public void visitSource(String source, String debug)(Code)(Java Doc)
|
|
|