Class ServiceLocatorTestRule.Visitor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Set<java.lang.Class<?>> classes
      A Set of Classes that will be added to by the visitAnnotation(String, boolean) method.
      private java.lang.String className
      The fully qualified class name of the Class being visited.
      • Fields inherited from class org.objectweb.asm.ClassVisitor

        api, cv
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Visitor​(java.util.Set<java.lang.Class<?>> classes, boolean verbose)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void visit​(int version, int access, java.lang.String name, java.lang.String signature, java.lang.String superName, java.lang.String[] interfaces)
      Called when a class file is encountered and internally records its fully qualified class name.
      org.objectweb.asm.AnnotationVisitor visitAnnotation​(java.lang.String annotationClassDescriptor, boolean visible)
      If the supplied annotationClassDescriptor is equal to "Lorg/jvnet/hk2/annotations/Service;", and if the supplied visible parameter is true, attempts to load the Class encountered in the prior (guaranteed) call to the visit(int, int, String, String, String, String[]) method, and, if that is successful, adds the resulting Class to the {@linkplain ServiceLocatorTestRule.Visitor#ServiceLocatorTestRule.Visitor(Set, boolean) Set of Classes that was supplied at construction time}.
      void visitEnd()
      Does nothing when invoked.
      • Methods inherited from class org.objectweb.asm.ClassVisitor

        getDelegate, visitAttribute, visitField, visitInnerClass, visitMethod, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation
      • Methods inherited from class java.lang.Object

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

      • visit

        public final void visit​(int version,
                                int access,
                                java.lang.String name,
                                java.lang.String signature,
                                java.lang.String superName,
                                java.lang.String[] interfaces)
        Called when a class file is encountered and internally records its fully qualified class name.

        It is guaranteed that this method will be called before the visitAnnotation(String, boolean) method on the current thread.

        Overrides:
        visit in class ClassVisitorImpl
        Parameters:
        version - ignored
        access - ignored
        name - the name of the class, whose package segments are separated with slashes ("/"); may be null
        signature - ignored
        superName - ignored
        interfaces - ignored
        See Also:
        visitAnnotation(String, boolean)
      • visitAnnotation

        public final org.objectweb.asm.AnnotationVisitor visitAnnotation​(java.lang.String annotationClassDescriptor,
                                                                         boolean visible)
        If the supplied annotationClassDescriptor is equal to "Lorg/jvnet/hk2/annotations/Service;", and if the supplied visible parameter is true, attempts to load the Class encountered in the prior (guaranteed) call to the visit(int, int, String, String, String, String[]) method, and, if that is successful, adds the resulting Class to the {@linkplain ServiceLocatorTestRule.Visitor#ServiceLocatorTestRule.Visitor(Set, boolean) Set of Classes that was supplied at construction time}.
        Overrides:
        visitAnnotation in class ClassVisitorImpl
        Parameters:
        annotationClassDescriptor - the descriptor for the annotation being visited; may be null
        visible - whether the annotation is visible or not
        Returns:
        null when invoked