I have one parametrized annotation (@MiTag1 in this case). And I want to create a new annotation (@MiTag2), that extends @MiTag1 and other annotation, and I want that the value of @MiTag1 "be extended" by the value of @MiTag2
With my code example, @MiTag2("bla") have to be the same as @MiTag1("bla"), but without hardcode "bla" inside @MiTag2.
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface MiTag1 {
/**
* The resource key.
*
* @see Resources
*/
String value();
}
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@MiTag1(value = THIS.VALUE)
public @interface MiTag2 {
/**
* The resource key.
*
* @see Resources
*/
String value();
}