Class TargetClassInfoReader

    • Field Detail

      • methodSignatures

        protected final java.util.Map<java.lang.String,​MethodSignatureVisitor> methodSignatures
      • superClassReaders

        protected final java.util.List<ClassReader> superClassReaders
      • allMethodSignatures

        protected final java.util.Set<java.lang.String> allMethodSignatures
      • classLoader

        protected final java.lang.ClassLoader classLoader
      • targetPackage

        protected java.lang.String targetPackage
      • targetClassname

        protected java.lang.String targetClassname
      • superName

        protected java.lang.String superName
      • thisReference

        protected java.lang.String thisReference
      • nextSupername

        protected java.lang.String nextSupername
      • superClasses

        protected java.lang.String[] superClasses
      • classAnnotations

        protected java.util.List<AnnotationInfo> classAnnotations
      • isTargetInterface

        protected boolean isTargetInterface
      • nextInterfaces

        protected java.util.Set<java.lang.String> nextInterfaces
      • generics

        protected java.util.Map<java.lang.String,​java.lang.String> generics
    • Constructor Detail

      • TargetClassInfoReader

        public TargetClassInfoReader​(java.lang.ClassLoader classLoader)
    • Method Detail

      • lookupMethodSignatureVisitor

        public MethodSignatureVisitor lookupMethodSignatureVisitor​(int access,
                                                                   java.lang.String name,
                                                                   java.lang.String desc,
                                                                   java.lang.String className)
        Returns method signature for some method. If signature is not found, returns null. Founded signatures means that those method can be proxyfied.
      • getPackage

        public java.lang.String getPackage()
        Description copied from interface: ClassInfo
        Returns package name.
        Specified by:
        getPackage in interface ClassInfo
      • getClassname

        public java.lang.String getClassname()
        Description copied from interface: ClassInfo
        Returns simple class name.
        Specified by:
        getClassname in interface ClassInfo
      • getSuperName

        public java.lang.String getSuperName()
        Description copied from interface: ClassInfo
        Returns super class reference.
        Specified by:
        getSuperName in interface ClassInfo
      • getReference

        public java.lang.String getReference()
        Description copied from interface: ClassInfo
        Returns class reference.
        Specified by:
        getReference in interface ClassInfo
      • getSuperClasses

        public java.lang.String[] getSuperClasses()
        Description copied from interface: ClassInfo
        Returns array of super classes.
        Specified by:
        getSuperClasses in interface ClassInfo
      • getAnnotations

        public AnnotationInfo[] getAnnotations()
        Description copied from interface: ClassInfo
        Returns annotation information or null if target class has no annotations.
        Specified by:
        getAnnotations in interface ClassInfo
      • visit

        public void visit​(int version,
                          int access,
                          java.lang.String name,
                          java.lang.String signature,
                          java.lang.String superName,
                          java.lang.String[] interfaces)
        Description copied from class: ClassVisitor
        Visits the header of the class.
        Overrides:
        visit in class ClassVisitor
        Parameters:
        version - the class version. The minor version is stored in the 16 most significant bits, and the major version in the 16 least significant bits.
        access - the class's access flags (see Opcodes). This parameter also indicates if the class is deprecated Opcodes.ACC_DEPRECATED or a record Opcodes.ACC_RECORD.
        name - the internal name of the class (see Type.getInternalName()).
        signature - the signature of this class. May be null if the class is not a generic one, and does not extend or implement generic classes or interfaces.
        superName - the internal of name of the super class (see Type.getInternalName()). For interfaces, the super class is Object. May be null, but only for the Object class.
        interfaces - the internal names of the class's interfaces (see Type.getInternalName()). May be null.
      • visitAnnotation

        public AnnotationVisitor visitAnnotation​(java.lang.String desc,
                                                 boolean visible)
        Description copied from class: ClassVisitor
        Visits an annotation of the class.
        Overrides:
        visitAnnotation in class ClassVisitor
        Parameters:
        desc - the class descriptor of the annotation class.
        visible - true if the annotation is visible at runtime.
        Returns:
        a visitor to visit the annotation values, or null if this visitor is not interested in visiting this annotation.
      • visitMethod

        public MethodVisitor visitMethod​(int access,
                                         java.lang.String name,
                                         java.lang.String desc,
                                         java.lang.String signature,
                                         java.lang.String[] exceptions)
        Stores method signature for target method.
        Overrides:
        visitMethod in class ClassVisitor
        Parameters:
        access - the method's access flags (see Opcodes). This parameter also indicates if the method is synthetic and/or deprecated.
        name - the method's name.
        desc - the method's descriptor (see Type).
        signature - the method's signature. May be null if the method parameters, return type and exceptions do not use generic types.
        exceptions - the internal names of the method's exception classes (see Type.getInternalName()). May be null.
        Returns:
        an object to visit the byte code of the method, or null if this class visitor is not interested in visiting the code of this method.
      • visitEnd

        public void visitEnd()
        Stores signatures for all super public methods not already overridden by target class. All this methods will be accepted for proxyfication.
        Overrides:
        visitEnd in class ClassVisitor
      • createMethodSignature

        protected MethodSignatureVisitor createMethodSignature​(int access,
                                                               java.lang.String methodName,
                                                               java.lang.String description,
                                                               java.lang.String signature,
                                                               java.lang.String[] exceptions,
                                                               java.lang.String classname,
                                                               java.util.Map<java.lang.String,​java.lang.String> declaredTypeGenerics)
        Creates method signature from method name.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object