use hint rather than roleHint

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1341650 13f79535-47bb-0310-9956-ffa450edef68
master
Olivier Lamy 2012-05-22 21:42:04 +00:00
parent b3be96af8e
commit f375619f9c
7 changed files with 16 additions and 16 deletions

View File

@ -45,8 +45,8 @@ public @interface Component
Class<?> role() default Object.class;
/**
* role-hint of the component to inject.
* @return the role-hint
* hint of the component to inject.
* @return the hint
*/
String roleHint() default "";
String hint() default "";
}

View File

@ -58,7 +58,7 @@ public abstract class AbstractFirstMojo
/**
*
*/
@Component( role = ArtifactMetadataSource.class, roleHint = "maven" )
@Component( role = ArtifactMetadataSource.class, hint = "maven" )
protected ArtifactMetadataSource artifactMetadataSource;
}

View File

@ -58,7 +58,7 @@ public abstract class AbstractFirstMojo
/**
*
*/
@Component( role = ArtifactMetadataSource.class, roleHint = "maven" )
@Component( role = ArtifactMetadataSource.class, hint = "maven" )
protected ArtifactMetadataSource artifactMetadataSource;
}

View File

@ -60,7 +60,7 @@ public class FirstMojo
@Parameter( alias = "alias" )
private String aliasedParam;
@Component( role = MavenProjectHelper.class, roleHint = "test" )
@Component( role = MavenProjectHelper.class, hint = "test" )
private Object projectHelper;
public void execute()

View File

@ -546,7 +546,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
new org.apache.maven.plugin.descriptor.Parameter();
parameter.setName( componentAnnotationContent.getFieldName() );
parameter.setRequirement( new Requirement( componentAnnotationContent.getRoleClassName(),
componentAnnotationContent.roleHint() ) );
componentAnnotationContent.hint() ) );
parameter.setDeprecated( componentAnnotationContent.getDeprecated() );
parameter.setSince( componentAnnotationContent.getSince() );

View File

@ -33,18 +33,18 @@ public class ComponentAnnotationContent
{
private String roleClassName;
private String roleHint;
private String hint;
public ComponentAnnotationContent( String fieldName )
{
super( fieldName );
}
public ComponentAnnotationContent( String fieldName, String role, String roleHint )
public ComponentAnnotationContent( String fieldName, String role, String hint )
{
this( fieldName );
this.roleClassName = role;
this.roleHint = roleHint;
this.hint = hint;
}
public Class<?> role()
@ -63,14 +63,14 @@ public class ComponentAnnotationContent
return roleClassName;
}
public String roleHint()
public String hint()
{
return roleHint == null ? "" : roleHint;
return hint == null ? "" : hint;
}
public void roleHint( String roleHint )
public void hint( String hint )
{
this.roleHint = roleHint;
this.hint = hint;
}
public Class<? extends Annotation> annotationType()
@ -85,7 +85,7 @@ public class ComponentAnnotationContent
sb.append( super.toString() );
sb.append( "ComponentAnnotationContent" );
sb.append( "{role='" ).append( roleClassName ).append( '\'' );
sb.append( ", roleHint='" ).append( roleHint ).append( '\'' );
sb.append( ", hint='" ).append( hint ).append( '\'' );
sb.append( '}' );
return sb.toString();
}

View File

@ -61,7 +61,7 @@ public class FooMojo
/**
*
*/
@Component( role = ArtifactMetadataSource.class, roleHint = "maven" )
@Component( role = ArtifactMetadataSource.class, hint = "maven" )
protected ArtifactMetadataSource artifactMetadataSource;
public void execute()