Class AnnotationComponentGleaner
- java.lang.Object
-
- org.codehaus.plexus.metadata.gleaner.ComponentGleanerSupport
-
- org.codehaus.plexus.metadata.gleaner.AnnotationComponentGleaner
-
- All Implemented Interfaces:
ClassComponentGleaner
public class AnnotationComponentGleaner extends ComponentGleanerSupport implements ClassComponentGleaner
A class component gleaner which inspects each type for org.codehaus.plexus.component.annotations.* annotations and when found translates them into aComponentDescriptor.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringOBJECT_SLASHED_NAME-
Fields inherited from interface org.codehaus.plexus.metadata.gleaner.ClassComponentGleaner
ROLE
-
-
Constructor Summary
Constructors Constructor Description AnnotationComponentGleaner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private PlexusConfigurationfindConfiguration(AnnField field, AnnClass c, java.lang.ClassLoader cl)private ComponentRequirementfindRequirement(AnnField field, AnnClass annClass, java.lang.ClassLoader cl)private java.util.List<AnnClass>getClasses(AnnClass annClass, java.lang.ClassLoader cl)Returns a list of all of the classes which the given type inherits from.ComponentDescriptor<?>glean(java.lang.String className, java.lang.ClassLoader cl)private AnnClassreadClass(java.lang.String className, java.lang.ClassLoader cl)private AnnClassreadClass2(java.lang.String className, java.lang.ClassLoader cl)-
Methods inherited from class org.codehaus.plexus.metadata.gleaner.ComponentGleanerSupport
addChildConfiguration, deHump, filterEmptyAsNull, isRequirementListType
-
-
-
-
Method Detail
-
glean
public ComponentDescriptor<?> glean(java.lang.String className, java.lang.ClassLoader cl) throws ComponentGleanerException
- Specified by:
gleanin interfaceClassComponentGleaner- Throws:
ComponentGleanerException
-
readClass
private AnnClass readClass(java.lang.String className, java.lang.ClassLoader cl) throws ComponentGleanerException
- Throws:
ComponentGleanerException
-
readClass2
private AnnClass readClass2(java.lang.String className, java.lang.ClassLoader cl) throws ComponentGleanerException
- Throws:
ComponentGleanerException
-
getClasses
private java.util.List<AnnClass> getClasses(AnnClass annClass, java.lang.ClassLoader cl) throws ComponentGleanerException
Returns a list of all of the classes which the given type inherits from.- Throws:
ComponentGleanerException
-
findRequirement
private ComponentRequirement findRequirement(AnnField field, AnnClass annClass, java.lang.ClassLoader cl) throws ComponentGleanerException
- Throws:
ComponentGleanerException
-
findConfiguration
private PlexusConfiguration findConfiguration(AnnField field, AnnClass c, java.lang.ClassLoader cl)
-
-