Class 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.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TypeExtractor()
      Creates a new type extractor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected TypeDescription toTypeDescription()
      Creates a type description from all data that is currently collected.
      void visit​(int classFileVersion, int modifiers, java.lang.String internalName, java.lang.String genericSignature, java.lang.String superClassName, java.lang.String[] interfaceName)  
      org.objectweb.asm.AnnotationVisitor visitAnnotation​(java.lang.String descriptor, boolean visible)  
      org.objectweb.asm.FieldVisitor visitField​(int modifiers, java.lang.String internalName, java.lang.String descriptor, java.lang.String genericSignature, java.lang.Object defaultValue)  
      void visitInnerClass​(java.lang.String internalName, java.lang.String outerName, java.lang.String innerName, int modifiers)  
      org.objectweb.asm.MethodVisitor visitMethod​(int modifiers, java.lang.String internalName, java.lang.String descriptor, java.lang.String genericSignature, java.lang.String[] exceptionName)  
      void visitNestHost​(java.lang.String nestHost)  
      void visitNestMember​(java.lang.String nestMember)  
      void visitOuterClass​(java.lang.String typeName, java.lang.String methodName, java.lang.String methodDescriptor)  
      void visitPermittedSubclass​(java.lang.String permittedSubclass)  
      org.objectweb.asm.RecordComponentVisitor visitRecordComponent​(java.lang.String name, java.lang.String descriptor, java.lang.String signature)  
      org.objectweb.asm.AnnotationVisitor visitTypeAnnotation​(int rawTypeReference, org.objectweb.asm.TypePath typePath, java.lang.String descriptor, boolean visible)  
      • Methods inherited from class org.objectweb.asm.ClassVisitor

        visitAttribute, visitEnd, visitModule, visitSource
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • REAL_MODIFIER_MASK

        private static final int REAL_MODIFIER_MASK
        A mask that cuts off pseudo flags beyond the second byte that are inserted by ASM.
        See Also:
        Constant Field Values
      • superTypeAnnotationTokens

        private final java.util.Map<java.lang.Integer,​java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> superTypeAnnotationTokens
        A mapping of the super types' type annotation tokens by their indices.
      • typeVariableAnnotationTokens

        private final java.util.Map<java.lang.Integer,​java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>> typeVariableAnnotationTokens
        A mapping of the type variables' type annotation tokens by their indices.
      • typeVariableBoundsAnnotationTokens

        private final java.util.Map<java.lang.Integer,​java.util.Map<java.lang.Integer,​java.util.Map<java.lang.String,​java.util.List<TypePool.Default.LazyTypeDescription.AnnotationToken>>>> typeVariableBoundsAnnotationTokens
        A mapping of the type variables' bounds' type annotation tokens by their indices and each variables index.
      • actualModifiers

        private int actualModifiers
        The actual modifiers found for this type.
      • modifiers

        private int modifiers
        The modifiers found for this type.
      • internalName

        private java.lang.String internalName
        The internal name found for this type.
      • superClassName

        private java.lang.String superClassName
        The internal name of the super type found for this type or null if no such type exists.
      • genericSignature

        private java.lang.String genericSignature
        The generic signature of the type or null if it is not generic.
      • interfaceName

        private java.lang.String[] interfaceName
        A list of internal names of interfaces implemented by this type or null if no interfaces are implemented.
      • anonymousType

        private boolean anonymousType
        true if this type was found to represent an anonymous type.
      • nestHost

        private java.lang.String nestHost
        The nest host that was found in the class file or null if no nest host was specified.
      • nestMembers

        private final java.util.List<java.lang.String> nestMembers
        A list of nest members that were found in the class file.
      • declaringTypeName

        private java.lang.String declaringTypeName
        The binary name of this type's declaring type or null if no such type exists.
      • declaredTypes

        private final java.util.List<java.lang.String> declaredTypes
        A list of descriptors representing the types that are declared by the parsed type.
      • permittedSubclasses

        private final java.util.List<java.lang.String> permittedSubclasses
        A list of internal names of permitted subclasses.
    • Constructor Detail

      • TypeExtractor

        protected TypeExtractor()
        Creates a new type extractor.
    • Method Detail

      • visit

        public void visit​(int classFileVersion,
                          int modifiers,
                          java.lang.String internalName,
                          java.lang.String genericSignature,
                          java.lang.String superClassName,
                          java.lang.String[] interfaceName)
        Overrides:
        visit in class org.objectweb.asm.ClassVisitor
      • visitOuterClass

        public void visitOuterClass​(java.lang.String typeName,
                                    java.lang.String methodName,
                                    java.lang.String methodDescriptor)
        Overrides:
        visitOuterClass in class org.objectweb.asm.ClassVisitor
      • visitInnerClass

        public void visitInnerClass​(java.lang.String internalName,
                                    java.lang.String outerName,
                                    java.lang.String innerName,
                                    int modifiers)
        Overrides:
        visitInnerClass in class org.objectweb.asm.ClassVisitor
      • visitTypeAnnotation

        public org.objectweb.asm.AnnotationVisitor visitTypeAnnotation​(int rawTypeReference,
                                                                       org.objectweb.asm.TypePath typePath,
                                                                       java.lang.String descriptor,
                                                                       boolean visible)
        Overrides:
        visitTypeAnnotation in class org.objectweb.asm.ClassVisitor
      • visitAnnotation

        public org.objectweb.asm.AnnotationVisitor visitAnnotation​(java.lang.String descriptor,
                                                                   boolean visible)
        Overrides:
        visitAnnotation in class org.objectweb.asm.ClassVisitor
      • visitField

        public org.objectweb.asm.FieldVisitor visitField​(int modifiers,
                                                         java.lang.String internalName,
                                                         java.lang.String descriptor,
                                                         java.lang.String genericSignature,
                                                         java.lang.Object defaultValue)
        Overrides:
        visitField in class org.objectweb.asm.ClassVisitor
      • visitMethod

        public org.objectweb.asm.MethodVisitor visitMethod​(int modifiers,
                                                           java.lang.String internalName,
                                                           java.lang.String descriptor,
                                                           java.lang.String genericSignature,
                                                           java.lang.String[] exceptionName)
        Overrides:
        visitMethod in class org.objectweb.asm.ClassVisitor
      • visitNestHost

        public void visitNestHost​(java.lang.String nestHost)
        Overrides:
        visitNestHost in class org.objectweb.asm.ClassVisitor
      • visitNestMember

        public void visitNestMember​(java.lang.String nestMember)
        Overrides:
        visitNestMember in class org.objectweb.asm.ClassVisitor
      • visitRecordComponent

        public org.objectweb.asm.RecordComponentVisitor visitRecordComponent​(java.lang.String name,
                                                                             java.lang.String descriptor,
                                                                             java.lang.String signature)
        Overrides:
        visitRecordComponent in class org.objectweb.asm.ClassVisitor
      • visitPermittedSubclass

        public void visitPermittedSubclass​(java.lang.String permittedSubclass)
        Overrides:
        visitPermittedSubclass in class org.objectweb.asm.ClassVisitor
      • toTypeDescription

        protected TypeDescription 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.