Class ClassAnnotationSceneReader
java.lang.Object
org.objectweb.asm.ClassVisitor
org.checkerframework.afu.scenelib.io.classfile.CodeOffsetAdapter
org.checkerframework.afu.scenelib.io.classfile.ClassAnnotationSceneReader
A
ClassAnnotationSceneReader is a ClassVisitor that will insert
all annotations it encounters while visiting a class into a given AScene.
The "read" in ClassAnnotationSceneReader refers to a class file being read into a
scene. Also see ClassAnnotationSceneWriter.
The proper usage of this class is to construct a ClassAnnotationSceneReader with an
AScene into which annotations should be inserted, then pass this as a ClassVisitor to ClassReader.accept(org.objectweb.asm.ClassVisitor, int)
All other methods are intended to be called only by ClassReader.accept(org.objectweb.asm.ClassVisitor, int), and should not be called anywhere else, due to the order
in which ClassVisitor methods should be called.
-
Field Summary
Fields inherited from class org.objectweb.asm.ClassVisitor
api, cv -
Constructor Summary
ConstructorsConstructorDescriptionClassAnnotationSceneReader(int api, org.objectweb.asm.ClassReader classReader, AScene scene, boolean ignoreBridgeMethods) Constructs a newClassAnnotationSceneReaderthat will insert all the annotations in the class that it visits intoscene. -
Method Summary
Modifier and TypeMethodDescriptionvoidvisit(int version, int access, String name, String signature, String superName, String[] interfaces) org.objectweb.asm.AnnotationVisitorvisitAnnotation(String descriptor, boolean visible) org.objectweb.asm.FieldVisitorvisitField(int access, String name, String descriptor, String signature, Object value) org.objectweb.asm.MethodVisitorvisitMethod(int access, String name, String descriptor, String signature, String[] exceptions) org.objectweb.asm.AnnotationVisitorvisitTypeAnnotation(int typeRef, org.objectweb.asm.TypePath typePath, String descriptor, boolean visible) Methods inherited from class org.checkerframework.afu.scenelib.io.classfile.CodeOffsetAdapter
getBytecodeOffset, getMethodCodeOffset, getPreviousCodeOffsetMethods inherited from class org.objectweb.asm.ClassVisitor
getDelegate, visitAttribute, visitEnd, visitInnerClass, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource
-
Constructor Details
-
ClassAnnotationSceneReader
public ClassAnnotationSceneReader(int api, org.objectweb.asm.ClassReader classReader, AScene scene, boolean ignoreBridgeMethods) Constructs a newClassAnnotationSceneReaderthat will insert all the annotations in the class that it visits intoscene.- Parameters:
api- the ASM API version to useclassReader- theClassReaderthat visits thisClassAnnotationSceneReaderscene- the annotation scene into which annotations this visits will be insertedignoreBridgeMethods- if true, omit annotations on compiler-generated methods
-
-
Method Details
-
visit
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) - Overrides:
visitin classorg.objectweb.asm.ClassVisitor
-
visitAnnotation
- Overrides:
visitAnnotationin classorg.objectweb.asm.ClassVisitor
-
visitTypeAnnotation
public org.objectweb.asm.AnnotationVisitor visitTypeAnnotation(int typeRef, org.objectweb.asm.TypePath typePath, String descriptor, boolean visible) - Overrides:
visitTypeAnnotationin classorg.objectweb.asm.ClassVisitor
-
visitField
public org.objectweb.asm.FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) - Overrides:
visitFieldin classorg.objectweb.asm.ClassVisitor
-
visitMethod
public org.objectweb.asm.MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) - Overrides:
visitMethodin classCodeOffsetAdapter
-