Class TypePool.Default.TypeExtractor
java.lang.Object
org.objectweb.asm.ClassVisitor
net.bytebuddy.pool.TypePool.Default.TypeExtractor
- Enclosing class:
TypePool.Default
protected class TypePool.Default.TypeExtractor
extends org.objectweb.asm.ClassVisitor
A type extractor reads a class file and collects data that is relevant to create a type description.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classAn annotation extractor reads an annotation found in a class field and collects data that is relevant to creating a related annotation description.protected classA field extractor reads a field within a class file and collects data that is relevant to creating a related field description.protected classA method extractor reads a method within a class file and collects data that is relevant to creating a related method description.protected classAn extractor for collecting module data.protected classA record component extractor reads a record component's information within a class file. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe actual modifiers found for this type.private final List<TypePool.Default.LazyTypeDescription.AnnotationToken> A list of annotation tokens describing annotations that are found on the visited type.private booleantrueif this type was found to represent an anonymous type.private ClassFileVersionThe discovered class file version ornullif no version was yet discovered.A list of descriptors representing the types that are declared by the parsed type.private StringThe binary name of this type's declaring type ornullif no such type exists.private final List<TypePool.Default.LazyTypeDescription.FieldToken> A list of field tokens describing fields that are found on the visited type.private StringThe generic signature of the type ornullif it is not generic.private String[]A list of internal names of interfaces implemented by this type ornullif no interfaces are implemented.private StringThe internal name found for this type.private final List<TypePool.Default.LazyTypeDescription.MethodToken> A list of method tokens describing annotations that are found on the visited type.private intThe modifiers found for this type.A token that describes module information ornullif no such information is available.private StringThe nest host that was found in the class file ornullif no nest host was specified.A list of nest members that were found in the class file.A list of internal names of permitted subclasses.private static final intA mask that cuts off pseudo flags beyond the second byte that are inserted by ASM.private final List<TypePool.Default.LazyTypeDescription.RecordComponentToken> A list of record component tokens that are found on the visited type.private static final intThe index of a super class's type annotations.private StringThe internal name of the super type found for this type ornullif no such type exists.A mapping of the super types' type annotation tokens by their indices.The declaration context found for this type.A mapping of the type variables' type annotation tokens by their indices.private final Map<Integer, Map<Integer, Map<String, List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> A mapping of the type variables' bounds' type annotation tokens by their indices and each variables index.Fields inherited from class org.objectweb.asm.ClassVisitor
api, cv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TypeDescriptionCreates a type description from all data that is currently collected.voidvisit(int classFileVersion, int modifiers, String internalName, String genericSignature, String superClassName, String[] interfaceName) org.objectweb.asm.AnnotationVisitorvisitAnnotation(String descriptor, boolean visible) org.objectweb.asm.FieldVisitorvisitField(int modifiers, String internalName, String descriptor, String genericSignature, Object value) voidvisitInnerClass(String internalName, String outerName, String innerName, int modifiers) org.objectweb.asm.MethodVisitorvisitMethod(int modifiers, String internalName, String descriptor, String genericSignature, String[] exceptionName) org.objectweb.asm.ModuleVisitorvisitModule(String name, int access, String version) voidvisitNestHost(String nestHost) voidvisitNestMember(String nestMember) voidvisitOuterClass(String typeName, String methodName, String methodDescriptor) voidvisitPermittedSubclass(String permittedSubclass) org.objectweb.asm.RecordComponentVisitorvisitRecordComponent(String name, String descriptor, String signature) org.objectweb.asm.AnnotationVisitorvisitTypeAnnotation(int rawTypeReference, org.objectweb.asm.TypePath typePath, String descriptor, boolean visible) Methods inherited from class org.objectweb.asm.ClassVisitor
getDelegate, visitAttribute, visitEnd, visitSource
-
Field Details
-
SUPER_CLASS_INDEX
private static final int SUPER_CLASS_INDEXThe index of a super class's type annotations.- See Also:
-
REAL_MODIFIER_MASK
private static final int REAL_MODIFIER_MASKA mask that cuts off pseudo flags beyond the second byte that are inserted by ASM.- See Also:
-
superTypeAnnotationTokens
-
typeVariableAnnotationTokens
-
typeVariableBoundsAnnotationTokens
-
annotationTokens
A list of annotation tokens describing annotations that are found on the visited type. -
moduleToken
A token that describes module information ornullif no such information is available. -
fieldTokens
A list of field tokens describing fields that are found on the visited type. -
methodTokens
A list of method tokens describing annotations that are found on the visited type. -
recordComponentTokens
A list of record component tokens that are found on the visited type. -
actualModifiers
private int actualModifiersThe actual modifiers found for this type. -
modifiers
private int modifiersThe modifiers found for this type. -
internalName
The internal name found for this type. -
superClassName
The internal name of the super type found for this type ornullif no such type exists. -
genericSignature
The generic signature of the type ornullif it is not generic. -
interfaceName
A list of internal names of interfaces implemented by this type ornullif no interfaces are implemented. -
anonymousType
private boolean anonymousTypetrueif this type was found to represent an anonymous type. -
nestHost
The nest host that was found in the class file ornullif no nest host was specified. -
nestMembers
-
typeContainment
The declaration context found for this type. -
declaringTypeName
The binary name of this type's declaring type ornullif no such type exists. -
declaredTypes
-
permittedSubclasses
-
classFileVersion
The discovered class file version ornullif no version was yet discovered.
-
-
Constructor Details
-
TypeExtractor
protected TypeExtractor()Creates a new type extractor.
-
-
Method Details
-
visit
public void visit(int classFileVersion, int modifiers, String internalName, @MaybeNull String genericSignature, @MaybeNull String superClassName, @MaybeNull String[] interfaceName) - Overrides:
visitin classorg.objectweb.asm.ClassVisitor
-
visitOuterClass
public void visitOuterClass(@MaybeNull String typeName, @MaybeNull String methodName, String methodDescriptor) - Overrides:
visitOuterClassin classorg.objectweb.asm.ClassVisitor
-
visitInnerClass
public void visitInnerClass(String internalName, @MaybeNull String outerName, @MaybeNull String innerName, int modifiers) - Overrides:
visitInnerClassin classorg.objectweb.asm.ClassVisitor
-
visitTypeAnnotation
public org.objectweb.asm.AnnotationVisitor visitTypeAnnotation(int rawTypeReference, @MaybeNull org.objectweb.asm.TypePath typePath, String descriptor, boolean visible) - Overrides:
visitTypeAnnotationin classorg.objectweb.asm.ClassVisitor
-
visitAnnotation
- Overrides:
visitAnnotationin classorg.objectweb.asm.ClassVisitor
-
visitField
public org.objectweb.asm.FieldVisitor visitField(int modifiers, String internalName, String descriptor, @MaybeNull String genericSignature, @MaybeNull Object value) - Overrides:
visitFieldin classorg.objectweb.asm.ClassVisitor
-
visitMethod
@MaybeNull public org.objectweb.asm.MethodVisitor visitMethod(int modifiers, String internalName, String descriptor, @MaybeNull String genericSignature, @MaybeNull String[] exceptionName) - Overrides:
visitMethodin classorg.objectweb.asm.ClassVisitor
-
visitModule
public org.objectweb.asm.ModuleVisitor visitModule(String name, int access, @MaybeNull String version) - Overrides:
visitModulein classorg.objectweb.asm.ClassVisitor
-
visitNestHost
- Overrides:
visitNestHostin classorg.objectweb.asm.ClassVisitor
-
visitNestMember
- Overrides:
visitNestMemberin classorg.objectweb.asm.ClassVisitor
-
visitRecordComponent
public org.objectweb.asm.RecordComponentVisitor visitRecordComponent(String name, String descriptor, @MaybeNull String signature) - Overrides:
visitRecordComponentin classorg.objectweb.asm.ClassVisitor
-
visitPermittedSubclass
- Overrides:
visitPermittedSubclassin classorg.objectweb.asm.ClassVisitor
-
toTypeDescription
Creates a type description from all data that is currently collected. This method should only be invoked after a class file was parsed fully.- Returns:
- A type description reflecting the data that was collected by this instance.
-