improved javadoc
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1592237 13f79535-47bb-0310-9956-ffa450edef68master
parent
c0ba1194b1
commit
ca9c92eaab
|
|
@ -69,6 +69,7 @@ import java.util.TreeSet;
|
|||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @author Olivier Lamy
|
||||
* @since 3.0
|
||||
|
|
@ -185,13 +186,9 @@ public class JavaAnnotationsMojoDescriptorExtractor
|
|||
|
||||
private boolean isMojoAnnnotatedClassCandidate( MojoAnnotatedClass mojoAnnotatedClass )
|
||||
{
|
||||
if ( mojoAnnotatedClass == null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return ( !mojoAnnotatedClass.getComponents().isEmpty() || !mojoAnnotatedClass.getParameters().isEmpty()
|
||||
|| mojoAnnotatedClass.getExecute() != null || mojoAnnotatedClass.getMojo() != null );
|
||||
|
||||
return mojoAnnotatedClass != null
|
||||
&& !( mojoAnnotatedClass.getComponents().isEmpty() && mojoAnnotatedClass.getParameters().isEmpty()
|
||||
&& mojoAnnotatedClass.getExecute() == null && mojoAnnotatedClass.getMojo() == null );
|
||||
}
|
||||
|
||||
protected Map<String, JavaClass> discoverClassesFromSourcesJar( Artifact artifact, PluginToolsRequest request,
|
||||
|
|
@ -612,7 +609,6 @@ public class JavaAnnotationsMojoDescriptorExtractor
|
|||
protected ExecuteAnnotationContent findExecuteInParentHierarchy( MojoAnnotatedClass mojoAnnotatedClass,
|
||||
Map<String, MojoAnnotatedClass> mojoAnnotatedClasses )
|
||||
{
|
||||
|
||||
if ( mojoAnnotatedClass.getExecute() != null )
|
||||
{
|
||||
return mojoAnnotatedClass.getExecute();
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ public class DefaultMojoAnnotationsScanner
|
|||
{
|
||||
IOUtil.close( archiveStream );
|
||||
}
|
||||
|
||||
return mojoAnnotatedClasses;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,13 @@ public interface MojoAnnotationsScanner
|
|||
|
||||
final List<String> FIELD_LEVEL_ANNOTATIONS = Arrays.asList( Parameter.class.getName(), Component.class.getName() );
|
||||
|
||||
/**
|
||||
* Scan classes for mojo annotations.
|
||||
*
|
||||
* @param request
|
||||
* @return map of mojo-annotated classes keyed by full class name
|
||||
* @throws ExtractionException
|
||||
*/
|
||||
Map<String, MojoAnnotatedClass> scan( MojoAnnotationsScannerRequest request )
|
||||
throws ExtractionException;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue