public abstract class MetadataAwareClassVisitor
extends org.objectweb.asm.ClassVisitor
Modifier | Constructor and Description |
---|---|
protected |
MetadataAwareClassVisitor(int api,
org.objectweb.asm.ClassVisitor classVisitor)
Creates a metadata aware class visitor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
onAfterAttributes()
Invoked if the attribute visitation is about to complete.
|
protected abstract void |
onNestHost()
Invoked if the nest host was not visited.
|
protected abstract void |
onOuterType()
Invoked if the outer class was not visited.
|
protected org.objectweb.asm.AnnotationVisitor |
onVisitAnnotation(String descriptor,
boolean visible)
An order-sensitive invocation of
ClassVisitor.visitAnnotation(String, boolean) . |
protected void |
onVisitAttribute(org.objectweb.asm.Attribute attribute)
An order-sensitive invocation of
ClassVisitor.visitAttribute(Attribute) . |
protected void |
onVisitEnd()
An order-sensitive invocation of
ClassVisitor.visitEnd() . |
protected org.objectweb.asm.FieldVisitor |
onVisitField(int modifiers,
String internalName,
String descriptor,
String signature,
Object defaultValue)
An order-sensitive invocation of
ClassVisitor.visitField(int, String, String, String, Object) . |
protected void |
onVisitInnerClass(String name,
String outerName,
String innerName,
int modifiers)
An order-sensitive invocation of
ClassVisitor.visitInnerClass(String, String, String, int) . |
protected org.objectweb.asm.MethodVisitor |
onVisitMethod(int modifiers,
String internalName,
String descriptor,
String signature,
String[] exception)
An order-sensitive invocation of
ClassVisitor.visitMethod(int, String, String, String, String[]) . |
protected void |
onVisitNestHost(String nestHost)
An order-sensitive invocation of
ClassVisitor.visitNestHost(String) . |
protected void |
onVisitNestMember(String nestMember)
An order-sensitive invocation of
ClassVisitor.visitNestMember(String) . |
protected void |
onVisitOuterClass(String owner,
String name,
String descriptor)
An order-sensitive invocation of
ClassVisitor.visitOuterClass(String, String, String) . |
protected org.objectweb.asm.AnnotationVisitor |
onVisitTypeAnnotation(int typeReference,
org.objectweb.asm.TypePath typePath,
String descriptor,
boolean visible)
An order-sensitive invocation of
ClassVisitor.visitTypeAnnotation(int, TypePath, String, boolean) . |
org.objectweb.asm.AnnotationVisitor |
visitAnnotation(String descriptor,
boolean visible) |
void |
visitAttribute(org.objectweb.asm.Attribute attribute) |
void |
visitEnd() |
org.objectweb.asm.FieldVisitor |
visitField(int modifiers,
String internalName,
String descriptor,
String signature,
Object defaultValue) |
void |
visitInnerClass(String name,
String outerName,
String innerName,
int modifiers) |
org.objectweb.asm.MethodVisitor |
visitMethod(int modifiers,
String internalName,
String descriptor,
String signature,
String[] exception) |
void |
visitNestHost(String nestHost) |
void |
visitNestMember(String nestMember) |
void |
visitOuterClass(String owner,
String name,
String descriptor) |
org.objectweb.asm.AnnotationVisitor |
visitTypeAnnotation(int typeReference,
org.objectweb.asm.TypePath typePath,
String descriptor,
boolean visible) |
protected MetadataAwareClassVisitor(int api, org.objectweb.asm.ClassVisitor classVisitor)
api
- The API version.classVisitor
- The class visitor to delegate to.protected abstract void onNestHost()
protected abstract void onOuterType()
protected abstract void onAfterAttributes()
public final void visitNestHost(String nestHost)
visitNestHost
in class org.objectweb.asm.ClassVisitor
protected void onVisitNestHost(String nestHost)
ClassVisitor.visitNestHost(String)
.nestHost
- The internal name of the nest host.public final void visitOuterClass(String owner, String name, String descriptor)
visitOuterClass
in class org.objectweb.asm.ClassVisitor
protected void onVisitOuterClass(String owner, String name, String descriptor)
ClassVisitor.visitOuterClass(String, String, String)
.owner
- The outer class's internal name.name
- The outer method's name or null
if it does not exist.descriptor
- The outer method's descriptor or null
if it does not exist.public final org.objectweb.asm.AnnotationVisitor visitAnnotation(String descriptor, boolean visible)
visitAnnotation
in class org.objectweb.asm.ClassVisitor
protected org.objectweb.asm.AnnotationVisitor onVisitAnnotation(String descriptor, boolean visible)
ClassVisitor.visitAnnotation(String, boolean)
.descriptor
- The annotation type's descriptor.visible
- true
if the annotation is visible at runtime.null
if the annotation should be ignored.public final org.objectweb.asm.AnnotationVisitor visitTypeAnnotation(int typeReference, org.objectweb.asm.TypePath typePath, String descriptor, boolean visible)
visitTypeAnnotation
in class org.objectweb.asm.ClassVisitor
protected org.objectweb.asm.AnnotationVisitor onVisitTypeAnnotation(int typeReference, org.objectweb.asm.TypePath typePath, String descriptor, boolean visible)
ClassVisitor.visitTypeAnnotation(int, TypePath, String, boolean)
.typeReference
- The type reference of the type annotation.typePath
- The type path of the type annotation.descriptor
- The descriptor of the annotation type.visible
- true
if the annotation is visible at runtime.null
if the annotation should be ignored.public final void visitAttribute(org.objectweb.asm.Attribute attribute)
visitAttribute
in class org.objectweb.asm.ClassVisitor
protected void onVisitAttribute(org.objectweb.asm.Attribute attribute)
ClassVisitor.visitAttribute(Attribute)
.attribute
- The attribute to visit.public final void visitNestMember(String nestMember)
visitNestMember
in class org.objectweb.asm.ClassVisitor
protected void onVisitNestMember(String nestMember)
ClassVisitor.visitNestMember(String)
.nestMember
- The internal name of the nest member.public final void visitInnerClass(String name, String outerName, String innerName, int modifiers)
visitInnerClass
in class org.objectweb.asm.ClassVisitor
protected void onVisitInnerClass(String name, String outerName, String innerName, int modifiers)
ClassVisitor.visitInnerClass(String, String, String, int)
.name
- The internal name of the inner class.outerName
- The internal name of the outer class.innerName
- The inner class's simple name or null
for an anonymous class.modifiers
- The inner class's source code modifiers.public final org.objectweb.asm.FieldVisitor visitField(int modifiers, String internalName, String descriptor, String signature, Object defaultValue)
visitField
in class org.objectweb.asm.ClassVisitor
protected org.objectweb.asm.FieldVisitor onVisitField(int modifiers, String internalName, String descriptor, String signature, Object defaultValue)
ClassVisitor.visitField(int, String, String, String, Object)
.modifiers
- The field's modifiers.internalName
- The field's internal name.descriptor
- The field type's descriptor.signature
- The field's generic signature or null
if the field is not generic.defaultValue
- The field's default value or null
if no such value exists.null
to ignore it.public final org.objectweb.asm.MethodVisitor visitMethod(int modifiers, String internalName, String descriptor, String signature, String[] exception)
visitMethod
in class org.objectweb.asm.ClassVisitor
protected org.objectweb.asm.MethodVisitor onVisitMethod(int modifiers, String internalName, String descriptor, String signature, String[] exception)
ClassVisitor.visitMethod(int, String, String, String, String[])
.modifiers
- The method's modifiers.internalName
- The method's internal name.descriptor
- The field type's descriptor.signature
- The method's generic signature or null
if the method is not generic.exception
- The method's declared exceptions or null
if no exceptions are declared.null
to ignore it.public final void visitEnd()
visitEnd
in class org.objectweb.asm.ClassVisitor
protected void onVisitEnd()
ClassVisitor.visitEnd()
.Copyright © 2014–2019. All rights reserved.