27 28 /** 29 * Indicates how long annotations with the annotated type are to 30 * be retained. If no Retention annotation is present on 31 * an annotation type declaration, the retention policy defaults to 32 * {@code RetentionPolicy.CLASS}. 33 * 34 * <p>A Retention meta-annotation has effect only if the 35 * meta-annotated type is used directly for annotation. It has no 36 * effect if the meta-annotated type is used as a member type in 37 * another annotation type. 38 * 39 * @author Joshua Bloch 40 * @since 1.5 41 * @jls 9.6.3.2 @Retention 42 */ 43 @Documented 44 @Retention(RetentionPolicy.RUNTIME) 45 @Target(ElementType.ANNOTATION_TYPE) 46 public @interface Retention { 47 RetentionPolicy value(); 48 } | 27 28 /** 29 * Indicates how long annotations with the annotated type are to 30 * be retained. If no Retention annotation is present on 31 * an annotation type declaration, the retention policy defaults to 32 * {@code RetentionPolicy.CLASS}. 33 * 34 * <p>A Retention meta-annotation has effect only if the 35 * meta-annotated type is used directly for annotation. It has no 36 * effect if the meta-annotated type is used as a member type in 37 * another annotation type. 38 * 39 * @author Joshua Bloch 40 * @since 1.5 41 * @jls 9.6.3.2 @Retention 42 */ 43 @Documented 44 @Retention(RetentionPolicy.RUNTIME) 45 @Target(ElementType.ANNOTATION_TYPE) 46 public @interface Retention { 47 /** 48 * Returns the retention policy. 49 * @return the retention policy 50 */ 51 RetentionPolicy value(); 52 } |