public class ReferencedClassVisitor extends java.lang.Object implements ClassVisitor, MemberVisitor, ConstantVisitor, AttributeVisitor, LocalVariableInfoVisitor, LocalVariableTypeInfoVisitor, AnnotationVisitor, ElementValueVisitor
ClassVisitor
, MemberVisitor
, ConstantVisitor
, AttributeVisitor
, etc. lets a given ClassVisitor
visit all the referenced classes of the
elements that it visits. Only downstream elements are considered (in order to avoid loops and
repeated visits)
It also considers references in the Kotlin metadata of this class, if includeKotlinMetadata = true. So that, for example, a Kotlin function referencing a type alias will execute the delegate class visitor for the referencedClass of the alias.
Modifier and Type | Class and Description |
---|---|
static class |
ReferencedClassVisitor.KotlinReferencedClassVisitor |
Constructor and Description |
---|
ReferencedClassVisitor(boolean includeKotlinMetadata,
ClassVisitor classVisitor) |
ReferencedClassVisitor(ClassVisitor classVisitor) |
Modifier and Type | Method and Description |
---|---|
void |
visitAnnotation(Clazz clazz,
Annotation annotation)
Visits any Annotation instance.
|
void |
visitAnnotationDefaultAttribute(Clazz clazz,
Method method,
AnnotationDefaultAttribute annotationDefaultAttribute) |
void |
visitAnnotationElementValue(Clazz clazz,
Annotation annotation,
AnnotationElementValue annotationElementValue) |
void |
visitAnyAnnotationsAttribute(Clazz clazz,
AnnotationsAttribute annotationsAttribute)
Visits any AnnotationsAttribute instance.
|
void |
visitAnyAttribute(Clazz clazz,
Attribute attribute)
Visits any Attribute instance.
|
void |
visitAnyClass(Clazz clazz)
Visits any Clazz instance.
|
void |
visitAnyConstant(Clazz clazz,
Constant constant)
Visits any Constant instance.
|
void |
visitAnyElementValue(Clazz clazz,
Annotation annotation,
ElementValue elementValue)
Visits any ElementValue instance.
|
void |
visitAnyParameterAnnotationsAttribute(Clazz clazz,
Method method,
ParameterAnnotationsAttribute parameterAnnotationsAttribute)
Visits any ParameterAnnotationsAttribute instance.
|
void |
visitAnyRefConstant(Clazz clazz,
RefConstant refConstant)
Visits any RefConstant instance.
|
void |
visitArrayElementValue(Clazz clazz,
Annotation annotation,
ArrayElementValue arrayElementValue) |
void |
visitClassConstant(Clazz clazz,
ClassConstant classConstant) |
void |
visitClassElementValue(Clazz clazz,
Annotation annotation,
ClassElementValue classElementValue) |
void |
visitCodeAttribute(Clazz clazz,
Method method,
CodeAttribute codeAttribute) |
void |
visitEnclosingMethodAttribute(Clazz clazz,
EnclosingMethodAttribute enclosingMethodAttribute) |
void |
visitEnumConstantElementValue(Clazz clazz,
Annotation annotation,
EnumConstantElementValue enumConstantElementValue) |
void |
visitInvokeDynamicConstant(Clazz clazz,
InvokeDynamicConstant invokeDynamicConstant) |
void |
visitLibraryClass(LibraryClass libraryClass) |
void |
visitLibraryMember(LibraryClass programClass,
LibraryMember libraryMember) |
void |
visitLocalVariableInfo(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
LocalVariableInfo localVariableInfo) |
void |
visitLocalVariableTableAttribute(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
LocalVariableTableAttribute localVariableTableAttribute) |
void |
visitLocalVariableTypeInfo(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
LocalVariableTypeInfo localVariableTypeInfo) |
void |
visitLocalVariableTypeTableAttribute(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
LocalVariableTypeTableAttribute localVariableTypeTableAttribute) |
void |
visitMethodTypeConstant(Clazz clazz,
MethodTypeConstant methodTypeConstant) |
void |
visitProgramClass(ProgramClass programClass) |
void |
visitProgramMember(ProgramClass programClass,
ProgramMember programMember) |
void |
visitSignatureAttribute(Clazz clazz,
SignatureAttribute signatureAttribute) |
void |
visitStringConstant(Clazz clazz,
StringConstant stringConstant) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitAnyMember, visitLibraryField, visitLibraryMethod, visitProgramField, visitProgramMethod
visitAnyMethodrefConstant, visitDoubleConstant, visitDynamicConstant, visitFieldrefConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitLongConstant, visitMethodHandleConstant, visitMethodrefConstant, visitModuleConstant, visitNameAndTypeConstant, visitPackageConstant, visitPrimitiveArrayConstant, visitUtf8Constant
visitAnyTypeAnnotationsAttribute, visitBootstrapMethodsAttribute, visitConstantValueAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitExceptionsAttribute, visitInnerClassesAttribute, visitLineNumberTableAttribute, visitMethodParametersAttribute, visitModuleAttribute, visitModuleMainClassAttribute, visitModulePackagesAttribute, visitNestHostAttribute, visitNestMembersAttribute, visitPermittedSubclassesAttribute, visitRecordAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleParameterAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleParameterAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSourceDebugExtensionAttribute, visitSourceDirAttribute, visitSourceFileAttribute, visitStackMapAttribute, visitStackMapTableAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitUnknownAttribute
visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation
visitConstantElementValue
public ReferencedClassVisitor(ClassVisitor classVisitor)
public ReferencedClassVisitor(boolean includeKotlinMetadata, ClassVisitor classVisitor)
public void visitAnyClass(Clazz clazz)
ClassVisitor
visitAnyClass
in interface ClassVisitor
public void visitProgramClass(ProgramClass programClass)
visitProgramClass
in interface ClassVisitor
public void visitLibraryClass(LibraryClass libraryClass)
visitLibraryClass
in interface ClassVisitor
public void visitProgramMember(ProgramClass programClass, ProgramMember programMember)
visitProgramMember
in interface MemberVisitor
public void visitLibraryMember(LibraryClass programClass, LibraryMember libraryMember)
visitLibraryMember
in interface MemberVisitor
public void visitAnyConstant(Clazz clazz, Constant constant)
ConstantVisitor
visitAnyConstant
in interface ConstantVisitor
public void visitStringConstant(Clazz clazz, StringConstant stringConstant)
visitStringConstant
in interface ConstantVisitor
public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant)
ConstantVisitor
visitAnyRefConstant
in interface ConstantVisitor
public void visitInvokeDynamicConstant(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant)
visitInvokeDynamicConstant
in interface ConstantVisitor
public void visitClassConstant(Clazz clazz, ClassConstant classConstant)
visitClassConstant
in interface ConstantVisitor
public void visitMethodTypeConstant(Clazz clazz, MethodTypeConstant methodTypeConstant)
visitMethodTypeConstant
in interface ConstantVisitor
public void visitAnyAttribute(Clazz clazz, Attribute attribute)
AttributeVisitor
visitAnyAttribute
in interface AttributeVisitor
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute)
visitEnclosingMethodAttribute
in interface AttributeVisitor
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
visitCodeAttribute
in interface AttributeVisitor
public void visitLocalVariableTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTableAttribute localVariableTableAttribute)
visitLocalVariableTableAttribute
in interface AttributeVisitor
public void visitLocalVariableTypeTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeTableAttribute localVariableTypeTableAttribute)
visitLocalVariableTypeTableAttribute
in interface AttributeVisitor
public void visitSignatureAttribute(Clazz clazz, SignatureAttribute signatureAttribute)
visitSignatureAttribute
in interface AttributeVisitor
public void visitAnyAnnotationsAttribute(Clazz clazz, AnnotationsAttribute annotationsAttribute)
AttributeVisitor
visitAnyAnnotationsAttribute
in interface AttributeVisitor
public void visitAnyParameterAnnotationsAttribute(Clazz clazz, Method method, ParameterAnnotationsAttribute parameterAnnotationsAttribute)
AttributeVisitor
visitAnyParameterAnnotationsAttribute
in interface AttributeVisitor
public void visitAnnotationDefaultAttribute(Clazz clazz, Method method, AnnotationDefaultAttribute annotationDefaultAttribute)
visitAnnotationDefaultAttribute
in interface AttributeVisitor
public void visitLocalVariableInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableInfo localVariableInfo)
visitLocalVariableInfo
in interface LocalVariableInfoVisitor
public void visitLocalVariableTypeInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeInfo localVariableTypeInfo)
visitLocalVariableTypeInfo
in interface LocalVariableTypeInfoVisitor
public void visitAnnotation(Clazz clazz, Annotation annotation)
AnnotationVisitor
visitAnnotation
in interface AnnotationVisitor
public void visitAnyElementValue(Clazz clazz, Annotation annotation, ElementValue elementValue)
ElementValueVisitor
visitAnyElementValue
in interface ElementValueVisitor
public void visitEnumConstantElementValue(Clazz clazz, Annotation annotation, EnumConstantElementValue enumConstantElementValue)
visitEnumConstantElementValue
in interface ElementValueVisitor
public void visitClassElementValue(Clazz clazz, Annotation annotation, ClassElementValue classElementValue)
visitClassElementValue
in interface ElementValueVisitor
public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue)
visitAnnotationElementValue
in interface ElementValueVisitor
public void visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue)
visitArrayElementValue
in interface ElementValueVisitor