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