Following is the Annotation Code
public @interface ColumnName {
String value();
String datatype();
}
I would like to make datatype an optional parameter. ie.
@ColumnName(value="password") should be a valid code.
Following is the Annotation Code
public @interface ColumnName {
String value();
String datatype();
}
I would like to make datatype an optional parameter. ie.
@ColumnName(value="password") should be a valid code.
Seems like first example of the official documentation says it all ...
/**
* Describes the Request-For-Enhancement(RFE) that led
* to the presence of the annotated API element.
*/
public @interface RequestForEnhancement {
int id();
String synopsis();
String engineer() default "[unassigned]";
String date(); default "[unimplemented]";
}
To make it optional you can assign it a default value like that:
public @interface ColumnName {
String value();
String datatype() default "String";
}
Then it doesn't need to be specified when using the Annotation.