KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > lang > annotation > Retention


1 /*
2  * @(#)Retention.java 1.5 04/06/22
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.lang.annotation;
9
10 /**
11  * Indicates how long annotations with the annotated type are to
12  * be retained. If no Retention annotation is present on
13  * an annotation type declaration, the retention policy defaults to
14  * <tt>RetentionPolicy.CLASS</tt>.
15  *
16  * <p>A Target meta-annotation has effect only if the meta-annotated
17  * type is use directly for annotation. It has no effect if the meta-annotated
18  * type is used as a member type in another annotation type.
19  *
20  * @author Joshua Bloch
21  * @since 1.5
22  */

23 @Documented JavaDoc
24 @Retention JavaDoc(RetentionPolicy.RUNTIME)
25 @Target JavaDoc(ElementType.ANNOTATION_TYPE)
26 public @interface Retention {
27     RetentionPolicy JavaDoc value();
28 }
29
Popular Tags