Package org.osjava.jardiff
Class ClassInfoVisitor
- java.lang.Object
-
- org.objectweb.asm.ClassVisitor
-
- org.osjava.jardiff.ClassInfoVisitor
-
public class ClassInfoVisitor extends org.objectweb.asm.ClassVisitorA reusable class which uses the ASM to build up ClassInfo about a java class file.- Author:
- Antony Riley
-
-
Field Summary
Fields Modifier and Type Field Description private intaccessThe access flags for the class.private java.util.MapfieldMapA map of field signature to a FieldInfo describing the field.private java.lang.String[]interfacesAn array of internal names of interfaces implemented by this class.private java.util.MapmethodMapA map of method signature to a MethodInfo describing the method.private java.lang.StringnameThe internal name of the class.private java.lang.StringsignatureThe signature of the classprivate java.lang.StringsupernameThe internal name of the superclass.private intversionThe class file version.
-
Constructor Summary
Constructors Constructor Description ClassInfoVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassInfogetClassInfo()The the classInfo this ClassInfoVisitor has built up about a classvoidreset()Reset this ClassInfoVisitor so that it can be used to visit another class.voidvisit(int version, int access, java.lang.String name, java.lang.String signature, java.lang.String supername, java.lang.String[] interfaces)Receive notification of information about a class from ASM.org.objectweb.asm.FieldVisitorvisitField(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.Object value)org.objectweb.asm.MethodVisitorvisitMethod(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.String[] exceptions)
-
-
-
Field Detail
-
version
private int version
The class file version.
-
access
private int access
The access flags for the class.
-
name
private java.lang.String name
The internal name of the class.
-
signature
private java.lang.String signature
The signature of the class
-
supername
private java.lang.String supername
The internal name of the superclass.
-
interfaces
private java.lang.String[] interfaces
An array of internal names of interfaces implemented by this class.
-
methodMap
private java.util.Map methodMap
A map of method signature to a MethodInfo describing the method.
-
fieldMap
private java.util.Map fieldMap
A map of field signature to a FieldInfo describing the field.
-
-
Method Detail
-
reset
public void reset()
Reset this ClassInfoVisitor so that it can be used to visit another class.
-
getClassInfo
public ClassInfo getClassInfo()
The the classInfo this ClassInfoVisitor has built up about a class
-
visit
public void visit(int version, int access, java.lang.String name, java.lang.String signature, java.lang.String supername, java.lang.String[] interfaces)Receive notification of information about a class from ASM.- Overrides:
visitin classorg.objectweb.asm.ClassVisitor- Parameters:
version- the class file version number.access- the access flags for the class.name- the internal name of the class.signature- the signature of the class.supername- the internal name of the super class.interfaces- the internal names of interfaces implemented.
-
visitMethod
public org.objectweb.asm.MethodVisitor visitMethod(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.String[] exceptions)- Overrides:
visitMethodin classorg.objectweb.asm.ClassVisitor
-
visitField
public org.objectweb.asm.FieldVisitor visitField(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.Object value)- Overrides:
visitFieldin classorg.objectweb.asm.ClassVisitor
-
-