org.apache.maven.tools.plugin.annotations
Class JavaAnnotationsMojoDescriptorExtractor

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor
All Implemented Interfaces:
MojoDescriptorExtractor, org.codehaus.plexus.logging.LogEnabled

@Component(role=MojoDescriptorExtractor.class,
           hint="java-annotations")
public class JavaAnnotationsMojoDescriptorExtractor
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements MojoDescriptorExtractor

JavaMojoDescriptorExtractor, a MojoDescriptor extractor to read descriptors from java classes with annotations.

Since:
3.0
Author:
Olivier Lamy

Field Summary
 
Fields inherited from interface org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
ROLE
 
Constructor Summary
JavaAnnotationsMojoDescriptorExtractor()
           
 
Method Summary
protected  Map<String,com.thoughtworks.qdox.model.JavaClass> discoverClasses(PluginToolsRequest request)
           
protected  Map<String,com.thoughtworks.qdox.model.JavaClass> discoverClasses(String encoding, List<File> sourceDirectories)
           
protected  Map<String,com.thoughtworks.qdox.model.JavaClass> discoverClasses(String encoding, org.apache.maven.project.MavenProject project)
           
protected  Map<String,com.thoughtworks.qdox.model.JavaClass> discoverClassesFromSourcesJar(org.apache.maven.artifact.Artifact artifact, PluginToolsRequest request, String classifier)
           
 List<org.apache.maven.plugin.descriptor.MojoDescriptor> execute(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
          Execute the mojo extraction.
 List<org.apache.maven.plugin.descriptor.MojoDescriptor> execute(PluginToolsRequest request)
          Execute the mojo extraction.
protected  ExecuteAnnotationContent findExecuteInParentHierarchy(MojoAnnotatedClass mojoAnnotatedClass, Map<String,MojoAnnotatedClass> mojoAnnotatedClasses)
           
protected  List<ComponentAnnotationContent> getComponentParent(MojoAnnotatedClass mojoAnnotatedClass, List<ComponentAnnotationContent> componentAnnotationContents, Map<String,MojoAnnotatedClass> mojoAnnotatedClasses)
           
protected  Map<String,ComponentAnnotationContent> getComponentsParentHierarchy(MojoAnnotatedClass mojoAnnotatedClass, Map<String,ComponentAnnotationContent> components, Map<String,MojoAnnotatedClass> mojoAnnotatedClasses)
           
protected  org.apache.maven.project.MavenProject getFromProjectReferences(org.apache.maven.artifact.Artifact artifact, org.apache.maven.project.MavenProject project)
           
protected  List<ParameterAnnotationContent> getParametersParent(MojoAnnotatedClass mojoAnnotatedClass, List<ParameterAnnotationContent> parameterAnnotationContents, Map<String,MojoAnnotatedClass> mojoAnnotatedClasses)
           
protected  Map<String,ParameterAnnotationContent> getParametersParentHierarchy(MojoAnnotatedClass mojoAnnotatedClass, Map<String,ParameterAnnotationContent> parameters, Map<String,MojoAnnotatedClass> mojoAnnotatedClasses)
           
protected  void populateDataFromJavadoc(Map<String,MojoAnnotatedClass> mojoAnnotatedClasses, Map<String,com.thoughtworks.qdox.model.JavaClass> javaClassesMap)
          from sources scan to get @since and @deprecated and description of classes and fields.
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaAnnotationsMojoDescriptorExtractor

public JavaAnnotationsMojoDescriptorExtractor()
Method Detail

execute

public List<org.apache.maven.plugin.descriptor.MojoDescriptor> execute(org.apache.maven.project.MavenProject project,
                                                                       org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
                                                                throws ExtractionException,
                                                                       org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
Description copied from interface: MojoDescriptorExtractor
Execute the mojo extraction.

Specified by:
execute in interface MojoDescriptorExtractor
Returns:
a list of mojo descriptors.
Throws:
ExtractionException - if any
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException - if any

execute

public List<org.apache.maven.plugin.descriptor.MojoDescriptor> execute(PluginToolsRequest request)
                                                                throws ExtractionException,
                                                                       org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
Description copied from interface: MojoDescriptorExtractor
Execute the mojo extraction.

Specified by:
execute in interface MojoDescriptorExtractor
Parameters:
request - The PluginToolsRequest containing information for the extraction process.
Returns:
a list of mojo descriptors.
Throws:
ExtractionException - if any
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException - if any

discoverClassesFromSourcesJar

protected Map<String,com.thoughtworks.qdox.model.JavaClass> discoverClassesFromSourcesJar(org.apache.maven.artifact.Artifact artifact,
                                                                                          PluginToolsRequest request,
                                                                                          String classifier)
                                                                                   throws ExtractionException
Throws:
ExtractionException

populateDataFromJavadoc

protected void populateDataFromJavadoc(Map<String,MojoAnnotatedClass> mojoAnnotatedClasses,
                                       Map<String,com.thoughtworks.qdox.model.JavaClass> javaClassesMap)
from sources scan to get @since and @deprecated and description of classes and fields.

Parameters:
mojoAnnotatedClasses -
javaClassesMap -

discoverClasses

protected Map<String,com.thoughtworks.qdox.model.JavaClass> discoverClasses(PluginToolsRequest request)

discoverClasses

protected Map<String,com.thoughtworks.qdox.model.JavaClass> discoverClasses(String encoding,
                                                                            org.apache.maven.project.MavenProject project)

discoverClasses

protected Map<String,com.thoughtworks.qdox.model.JavaClass> discoverClasses(String encoding,
                                                                            List<File> sourceDirectories)

findExecuteInParentHierarchy

protected ExecuteAnnotationContent findExecuteInParentHierarchy(MojoAnnotatedClass mojoAnnotatedClass,
                                                                Map<String,MojoAnnotatedClass> mojoAnnotatedClasses)

getParametersParentHierarchy

protected Map<String,ParameterAnnotationContent> getParametersParentHierarchy(MojoAnnotatedClass mojoAnnotatedClass,
                                                                              Map<String,ParameterAnnotationContent> parameters,
                                                                              Map<String,MojoAnnotatedClass> mojoAnnotatedClasses)

getParametersParent

protected List<ParameterAnnotationContent> getParametersParent(MojoAnnotatedClass mojoAnnotatedClass,
                                                               List<ParameterAnnotationContent> parameterAnnotationContents,
                                                               Map<String,MojoAnnotatedClass> mojoAnnotatedClasses)

getComponentsParentHierarchy

protected Map<String,ComponentAnnotationContent> getComponentsParentHierarchy(MojoAnnotatedClass mojoAnnotatedClass,
                                                                              Map<String,ComponentAnnotationContent> components,
                                                                              Map<String,MojoAnnotatedClass> mojoAnnotatedClasses)

getComponentParent

protected List<ComponentAnnotationContent> getComponentParent(MojoAnnotatedClass mojoAnnotatedClass,
                                                              List<ComponentAnnotationContent> componentAnnotationContents,
                                                              Map<String,MojoAnnotatedClass> mojoAnnotatedClasses)

getFromProjectReferences

protected org.apache.maven.project.MavenProject getFromProjectReferences(org.apache.maven.artifact.Artifact artifact,
                                                                         org.apache.maven.project.MavenProject project)


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.