org.sonatype.guice.plexus.scanners
Class PlexusTypeVisitor

java.lang.Object
  extended by org.sonatype.guice.bean.scanners.EmptyClassVisitor
      extended by org.sonatype.guice.plexus.scanners.PlexusTypeVisitor
All Implemented Interfaces:
ClassVisitor, ClassSpaceVisitor

public final class PlexusTypeVisitor
extends EmptyClassVisitor
implements ClassSpaceVisitor

ClassSpaceVisitor that reports Plexus bean classes annotated with @Component.


Constructor Summary
PlexusTypeVisitor(PlexusTypeListener listener)
           
 
Method Summary
 void visit(ClassSpace _space)
          Visits the start of the class space.
 void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
          Visits the header of the class.
 AnnotationVisitor visitAnnotation(String desc, boolean visible)
          Visits an annotation of the class.
 ClassVisitor visitClass(URL url)
          Visits a class resource in the class space.
 void visitEnd()
          Visits the end of the class.
 
Methods inherited from class org.sonatype.guice.bean.scanners.EmptyClassVisitor
visitAttribute, visitField, visitInnerClass, visitMethod, visitOuterClass, visitSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlexusTypeVisitor

public PlexusTypeVisitor(PlexusTypeListener listener)
Method Detail

visit

public void visit(ClassSpace _space)
Description copied from interface: ClassSpaceVisitor
Visits the start of the class space.

Specified by:
visit in interface ClassSpaceVisitor
Parameters:
_space - The class space

visitClass

public ClassVisitor visitClass(URL url)
Description copied from interface: ClassSpaceVisitor
Visits a class resource in the class space.

Specified by:
visitClass in interface ClassSpaceVisitor
Parameters:
url - The class resource URL
Returns:
Class visitor; null if this visitor is not interested in visiting the class

visit

public void visit(int version,
                  int access,
                  String name,
                  String signature,
                  String superName,
                  String[] interfaces)
Description copied from interface: ClassVisitor
Visits the header of the class.

Specified by:
visit in interface ClassVisitor
Overrides:
visit in class EmptyClassVisitor
Parameters:
version - the class version.
access - the class's access flags (see Opcodes). This parameter also indicates if the class is deprecated.
name - the internal name of the class (see 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 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 getInternalName). May be null.

visitAnnotation

public AnnotationVisitor visitAnnotation(String desc,
                                         boolean visible)
Description copied from interface: ClassVisitor
Visits an annotation of the class.

Specified by:
visitAnnotation in interface ClassVisitor
Overrides:
visitAnnotation in class EmptyClassVisitor
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.

visitEnd

public void visitEnd()
Description copied from interface: ClassVisitor
Visits the end of the class. This method, which is the last one to be called, is used to inform the visitor that all the fields and methods of the class have been visited.

Specified by:
visitEnd in interface ClassVisitor
Specified by:
visitEnd in interface ClassSpaceVisitor
Overrides:
visitEnd in class EmptyClassVisitor


Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.