restore required and readonly attributes in @Component (not sure the need of that :-) ) maybe future use in core.
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1337639 13f79535-47bb-0310-9956-ffa450edef68master
parent
98cebd50b7
commit
ca84ee10df
|
|
@ -39,4 +39,8 @@ public @interface Component
|
||||||
String role() default "";
|
String role() default "";
|
||||||
|
|
||||||
String roleHint() default "";
|
String roleHint() default "";
|
||||||
|
|
||||||
|
boolean required() default false;
|
||||||
|
|
||||||
|
boolean readonly() default false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -516,6 +516,9 @@ public class JavaAnnotationsMojoDescriptorExtractor
|
||||||
parameter.setEditable( false );
|
parameter.setEditable( false );
|
||||||
parameter.setDeprecated( componentAnnotationContent.getDeprecated() );
|
parameter.setDeprecated( componentAnnotationContent.getDeprecated() );
|
||||||
parameter.setSince( componentAnnotationContent.getSince() );
|
parameter.setSince( componentAnnotationContent.getSince() );
|
||||||
|
// same behaviour as JavaMojoDescriptorExtractor
|
||||||
|
//parameter.setRequired( componentAnnotationContent.required() );
|
||||||
|
parameter.setEditable( false );
|
||||||
mojoDescriptor.addParameter( parameter );
|
mojoDescriptor.addParameter( parameter );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,10 @@ public class ComponentAnnotationContent
|
||||||
|
|
||||||
private String roleHint;
|
private String roleHint;
|
||||||
|
|
||||||
|
private boolean required = false;
|
||||||
|
|
||||||
|
private boolean readonly = false;
|
||||||
|
|
||||||
public ComponentAnnotationContent( String fieldName )
|
public ComponentAnnotationContent( String fieldName )
|
||||||
{
|
{
|
||||||
super( fieldName );
|
super( fieldName );
|
||||||
|
|
@ -72,6 +76,26 @@ public class ComponentAnnotationContent
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean required()
|
||||||
|
{
|
||||||
|
return required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void required( boolean required )
|
||||||
|
{
|
||||||
|
this.required = required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean readonly()
|
||||||
|
{
|
||||||
|
return readonly;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void readonly( boolean readonly )
|
||||||
|
{
|
||||||
|
this.readonly = readonly;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue