Class JavaAnnotationsMojoDescriptorExtractor
java.lang.Object
org.apache.maven.tools.plugin.extractor.annotations.JavaAnnotationsMojoDescriptorExtractor
- All Implemented Interfaces:
org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
@Named("java-annotations")
@Singleton
public class JavaAnnotationsMojoDescriptorExtractor
extends Object
implements org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
JavaMojoDescriptorExtractor, a MojoDescriptor extractor to read descriptors from java classes with annotations.
Notice that source files are also parsed to get description, since and deprecation information.
- Since:
- 3.0
- Author:
- Olivier Lamy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondiscoverClasses(com.thoughtworks.qdox.JavaProjectBuilder builder) List<org.apache.maven.plugin.descriptor.MojoDescriptor> execute(org.apache.maven.tools.plugin.PluginToolsRequest request) protected voidextendJavaProjectBuilderWithSourcesJar(com.thoughtworks.qdox.JavaProjectBuilder builder, org.apache.maven.artifact.Artifact artifact, org.apache.maven.tools.plugin.PluginToolsRequest request, String classifier) protected MojoAnnotatedClassfindClassWithExecuteAnnotationInParentHierarchy(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, MojoAnnotatedClass> mojoAnnotatedClasses) protected org.apache.maven.project.MavenProjectgetFromProjectReferences(org.apache.maven.artifact.Artifact artifact, org.apache.maven.project.MavenProject project) org.apache.maven.tools.plugin.extractor.GroupKeygetName()protected List<ParameterAnnotationContent> getParametersParent(MojoAnnotatedClass mojoAnnotatedClass, List<ParameterAnnotationContent> parameterAnnotationContents, Map<String, MojoAnnotatedClass> mojoAnnotatedClasses) protected Map<String, ParameterAnnotationContent> getParametersParentHierarchy(MojoAnnotatedClass mojoAnnotatedClass, Map<String, MojoAnnotatedClass> mojoAnnotatedClasses) booleanprotected voidpopulateDataFromJavadoc(com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder, Map<String, MojoAnnotatedClass> mojoAnnotatedClasses, Map<String, com.thoughtworks.qdox.model.JavaClass> javaClassesMap, org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator linkGenerator) from sources scan to get @since and @deprecated and description of classes and fields.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
getRequiredJavaVersion
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
JavaAnnotationsMojoDescriptorExtractor
public JavaAnnotationsMojoDescriptorExtractor()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
-
isDeprecated
public boolean isDeprecated()- Specified by:
isDeprecatedin interfaceorg.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
-
getGroupKey
public org.apache.maven.tools.plugin.extractor.GroupKey getGroupKey()- Specified by:
getGroupKeyin interfaceorg.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
-
execute
public List<org.apache.maven.plugin.descriptor.MojoDescriptor> execute(org.apache.maven.tools.plugin.PluginToolsRequest request) throws org.apache.maven.tools.plugin.extractor.ExtractionException, org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException - Specified by:
executein interfaceorg.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor- Throws:
org.apache.maven.tools.plugin.extractor.ExtractionExceptionorg.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
-
populateDataFromJavadoc
protected void populateDataFromJavadoc(com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder, Map<String, MojoAnnotatedClass> mojoAnnotatedClasses, Map<String, com.thoughtworks.qdox.model.JavaClass> javaClassesMap, org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator linkGenerator) from sources scan to get @since and @deprecated and description of classes and fields. -
discoverClasses
-
extendJavaProjectBuilderWithSourcesJar
protected void extendJavaProjectBuilderWithSourcesJar(com.thoughtworks.qdox.JavaProjectBuilder builder, org.apache.maven.artifact.Artifact artifact, org.apache.maven.tools.plugin.PluginToolsRequest request, String classifier) throws org.apache.maven.tools.plugin.extractor.ExtractionException - Throws:
org.apache.maven.tools.plugin.extractor.ExtractionException
-
findClassWithExecuteAnnotationInParentHierarchy
protected MojoAnnotatedClass findClassWithExecuteAnnotationInParentHierarchy(MojoAnnotatedClass mojoAnnotatedClass, Map<String, MojoAnnotatedClass> mojoAnnotatedClasses) -
getParametersParentHierarchy
protected Map<String,ParameterAnnotationContent> getParametersParentHierarchy(MojoAnnotatedClass mojoAnnotatedClass, 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, 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)
-