code simplification
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1592265 13f79535-47bb-0310-9956-ffa450edef68master
parent
63a11167e0
commit
daf8877b3d
|
|
@ -186,9 +186,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
|
|||
|
||||
private boolean isMojoAnnnotatedClassCandidate( MojoAnnotatedClass mojoAnnotatedClass )
|
||||
{
|
||||
return mojoAnnotatedClass != null
|
||||
&& !( mojoAnnotatedClass.getComponents().isEmpty() && mojoAnnotatedClass.getParameters().isEmpty()
|
||||
&& mojoAnnotatedClass.getExecute() == null && mojoAnnotatedClass.getMojo() == null );
|
||||
return mojoAnnotatedClass != null && mojoAnnotatedClass.hasAnnotations();
|
||||
}
|
||||
|
||||
protected Map<String, JavaClass> discoverClassesFromSourcesJar( Artifact artifact, PluginToolsRequest request,
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ public class DefaultMojoAnnotationsScanner
|
|||
|
||||
if ( mojoAnnotatedClass != null ) // see MPLUGIN-206 we can have intermediate classes without annotations
|
||||
{
|
||||
if ( getLogger().isDebugEnabled() && hasMojoAnnotations( mojoAnnotatedClass ) )
|
||||
if ( getLogger().isDebugEnabled() && mojoAnnotatedClass.hasAnnotations() )
|
||||
{
|
||||
getLogger().debug( "found MojoAnnotatedClass:" + mojoAnnotatedClass.getClassName() + ":"
|
||||
+ mojoAnnotatedClass );
|
||||
|
|
@ -222,12 +222,6 @@ public class DefaultMojoAnnotationsScanner
|
|||
}
|
||||
}
|
||||
|
||||
private boolean hasMojoAnnotations( MojoAnnotatedClass mojoAnnotatedClass )
|
||||
{
|
||||
return !( mojoAnnotatedClass.getComponents().isEmpty() && mojoAnnotatedClass.getParameters().isEmpty()
|
||||
&& mojoAnnotatedClass.getExecute() == null && mojoAnnotatedClass.getMojo() == null );
|
||||
}
|
||||
|
||||
protected void populateAnnotationContent( Object content, MojoAnnotationVisitor mojoAnnotationVisitor )
|
||||
throws ReflectorException
|
||||
{
|
||||
|
|
|
|||
|
|
@ -146,6 +146,11 @@ public class MojoAnnotatedClass
|
|||
this.artifact = artifact;
|
||||
}
|
||||
|
||||
public boolean hasAnnotations()
|
||||
{
|
||||
return !( getComponents().isEmpty() && getParameters().isEmpty() && execute == null && mojo == null );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue