1 /** 2 * - Digitalis Internal Framework v2.0 - 3 * 4 * (C) 2007, Digitalis Informatica. 5 * 6 * Distribuicao e Gestao de Informatica, Lda. 7 * Estrada de Paco de Arcos num.9 - Piso -1 8 * 2780-666 Paco de Arcos 9 * Telefone: (351) 21 4408990 10 * Fax: (351) 21 4408999 11 * http://www.digitalis.pt 12 */ 13 package pt.digitalis.dif.dem.annotations.metaannotations; 14 15 import java.lang.annotation.ElementType; 16 import java.lang.annotation.Retention; 17 import java.lang.annotation.RetentionPolicy; 18 import java.lang.annotation.Target; 19 20 /** 21 * Defines the list of primary annotations that accept the current annotation. 22 * 23 * This meta-annotation is mandatory on non-primary annotations. 24 * 25 * @author Pedro Viegas <a 26 * href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a> 27 * @author Rodrigo Gonçalves <a 28 * href="mailto:rgoncalves@digitalis.pt">rgoncalves@digitalis.pt</a> 29 * @created Aug 29, 2007 30 */ 31 @Target(ElementType.ANNOTATION_TYPE) 32 @Retention(RetentionPolicy.RUNTIME) 33 public @interface BindToPrimary { 34 35 /** 36 * The FQN's of the annotations that can be used with the non-primary 37 * annotation. 38 * 39 * TODO: Should allow for simple class names, defaulting to the current 40 * package. Also allow the use of: 41 * - "#BasePackage#.entities.ApplicationDefinition 42 * - "#BasePackage#.Application 43 * - "#Entities#.ApplicationDefinition 44 * - "#Parameter#.Parameter 45 * - "#Stage#.ErrorView 46 * 47 * Algorithm (TO Rodrigo, BY Rodrigo): 48 * 49 * On DEM Annotation's discovery: 50 * 51 * 1) read the package of the the annotation annotated by this meta-annotation (Class.getPackage().getName()??) 52 * 2) rewrite this member value's with the read package name concatenated with the member value 53 * 54 * Use an helper method since it's also present on <code>@ExclusiveWith</code> 55 */ 56 String[] value(); 57 }