01: package spoon.aval.annotation;
02:
03: import spoon.aval.annotation.structure.AValTarget;
04: import spoon.reflect.declaration.CtAnnotationType;
05:
06: /**
07: * Meta annotation used to replace the implementation of an external
08: * annotation of the same name.
09: * <p>
10: * For example, to validate the java.lang.Override annotation (for which
11: * we do not have the source code), it suffices to create a (dummy) annotation called
12: * Override in any package, and meta annotate it with this annotation. The code
13: * of the dummy would be:
14: *
15: * <pre>
16: * @ReplacesAnnotationInPackage("java.lang")
17: * public @interface Overrides {
18: * }
19: * </pre>
20: */
21: @AValTarget(CtAnnotationType.class)
22: public @interface ReplacesAnnotationInPackage {
23: /**
24: * The package in which the annotation to replace is defined.
25: */
26: String value();
27: }
|