public abstract class MetadataAwareClassVisitor extends ClassVisitor
api, cv| Modifier | Constructor and Description |
|---|---|
protected |
MetadataAwareClassVisitor(int api,
ClassVisitor classVisitor)
Creates a metadata aware class visitor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
onAfterAttributes()
Invoked if the attribute visitation is about to complete.
|
protected void |
onNestHost()
Invoked if the nest host was not visited.
|
protected void |
onOuterType()
Invoked if the outer class was not visited.
|
protected AnnotationVisitor |
onVisitAnnotation(String descriptor,
boolean visible)
An order-sensitive invocation of
ClassVisitor.visitAnnotation(String, boolean). |
protected void |
onVisitAttribute(Attribute attribute)
An order-sensitive invocation of
ClassVisitor.visitAttribute(Attribute). |
protected void |
onVisitEnd()
An order-sensitive invocation of
ClassVisitor.visitEnd(). |
protected FieldVisitor |
onVisitField(int modifiers,
String internalName,
String descriptor,
String signature,
Object value)
An order-sensitive invocation of
ClassVisitor.visitField(int, String, String, String, Object). |
protected void |
onVisitInnerClass(String internalName,
String outerName,
String innerName,
int modifiers)
An order-sensitive invocation of
ClassVisitor.visitInnerClass(String, String, String, int). |
protected 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 void |
onVisitPermittedSubclass(String permittedSubclass)
An order-sensitive invocation of
ClassVisitor#visitPermittedSubclass. |
protected RecordComponentVisitor |
onVisitRecordComponent(String name,
String descriptor,
String signature)
An order-sensitive invocation of
ClassVisitor.visitRecordComponent(String, String, String). |
protected AnnotationVisitor |
onVisitTypeAnnotation(int typeReference,
TypePath typePath,
String descriptor,
boolean visible)
An order-sensitive invocation of
ClassVisitor.visitTypeAnnotation(int, TypePath, String, boolean). |
AnnotationVisitor |
visitAnnotation(String descriptor,
boolean visible) |
void |
visitAttribute(Attribute attribute) |
void |
visitEnd() |
FieldVisitor |
visitField(int modifiers,
String internalName,
String descriptor,
String signature,
Object value) |
void |
visitInnerClass(String name,
String outerName,
String innerName,
int modifiers) |
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) |
void |
visitPermittedSubclass(String permittedSubclass) |
RecordComponentVisitor |
visitRecordComponent(String name,
String descriptor,
String signature) |
AnnotationVisitor |
visitTypeAnnotation(int typeReference,
TypePath typePath,
String descriptor,
boolean visible) |
getDelegate, visit, visitModule, visitSourceprotected MetadataAwareClassVisitor(int api,
ClassVisitor classVisitor)
api - The API version.classVisitor - The class visitor to delegate to.protected void onNestHost()
protected void onOuterType()
protected void onAfterAttributes()
public final void visitNestHost(String nestHost)
visitNestHost in class ClassVisitorprotected void onVisitNestHost(String nestHost)
ClassVisitor.visitNestHost(String).nestHost - The internal name of the nest host.public final void visitOuterClass(String owner, @MaybeNull String name, @MaybeNull String descriptor)
visitOuterClass in class ClassVisitorprotected void onVisitOuterClass(String owner, @MaybeNull String name, @MaybeNull 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 void visitPermittedSubclass(String permittedSubclass)
visitPermittedSubclass in class ClassVisitorprotected void onVisitPermittedSubclass(String permittedSubclass)
ClassVisitor#visitPermittedSubclass.permittedSubclass - The internal name of the permitted subclass.@MaybeNull public RecordComponentVisitor visitRecordComponent(String name, String descriptor, @MaybeNull String signature)
visitRecordComponent in class ClassVisitor@MaybeNull protected RecordComponentVisitor onVisitRecordComponent(String name, String descriptor, @MaybeNull String signature)
ClassVisitor.visitRecordComponent(String, String, String).name - The record component's name.descriptor - The record component's descriptor.signature - The record component's generic signature or null if the record component's type is non-generic.null if the component should not be visited.@MaybeNull public final AnnotationVisitor visitAnnotation(String descriptor, boolean visible)
visitAnnotation in class ClassVisitor@MaybeNull protected 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.@MaybeNull public final AnnotationVisitor visitTypeAnnotation(int typeReference, TypePath typePath, String descriptor, boolean visible)
visitTypeAnnotation in class ClassVisitor@MaybeNull protected AnnotationVisitor onVisitTypeAnnotation(int typeReference, 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(Attribute attribute)
visitAttribute in class ClassVisitorprotected void onVisitAttribute(Attribute attribute)
ClassVisitor.visitAttribute(Attribute).attribute - The attribute to visit.public final void visitNestMember(String nestMember)
visitNestMember in class ClassVisitorprotected void onVisitNestMember(String nestMember)
ClassVisitor.visitNestMember(String).nestMember - The internal name of the nest member.public final void visitInnerClass(String name, @MaybeNull String outerName, @MaybeNull String innerName, int modifiers)
visitInnerClass in class ClassVisitorprotected void onVisitInnerClass(String internalName, @MaybeNull String outerName, @MaybeNull String innerName, int modifiers)
ClassVisitor.visitInnerClass(String, String, String, int).internalName - The internal name of the inner class.outerName - The internal name of the outer class or null for a member class.innerName - The inner class's simple name or null for an anonymous class.modifiers - The inner class's source code modifiers.@MaybeNull public final FieldVisitor visitField(int modifiers, String internalName, String descriptor, @MaybeNull String signature, @MaybeNull Object value)
visitField in class ClassVisitor@MaybeNull protected FieldVisitor onVisitField(int modifiers, String internalName, String descriptor, @MaybeNull String signature, @MaybeNull Object value)
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.value - The field's default value or null if no such value exists.null to ignore it.@MaybeNull public final MethodVisitor visitMethod(int modifiers, String internalName, String descriptor, @MaybeNull String signature, @MaybeNull String[] exception)
visitMethod in class ClassVisitor@MaybeNull protected MethodVisitor onVisitMethod(int modifiers, String internalName, String descriptor, @MaybeNull String signature, @MaybeNull 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 ClassVisitorprotected void onVisitEnd()
ClassVisitor.visitEnd().Copyright © 2014–2025. All rights reserved.