KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)Inherited.java 1.4 04/02/03
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 that an annotation type is automatically inherited. If
12  * an Inherited meta-annotation is present on an annotation type
13  * declaration, and the user queries the annotation type on a class
14  * declaration, and the class declaration has no annotation for this type,
15  * then the class's superclass will automatically be queried for the
16  * annotation type. This process will be repeated until an annotation for this
17  * type is found, or the top of the class hierarchy (Object)
18  * is reached. If no superclass has an annotation for this type, then
19  * the query will indicate that the class in question has no such annotation.
20  *
21  * <p>Note that this meta-annotation type has no effect if the annotated
22  * type is used to annotate anything other than a class. Note also
23  * that this meta-annotation only causes annotations to be inherited
24  * from superclasses; annotations on implemented interfaces have no
25  * effect.
26  *
27  * @author Joshua Bloch
28  * @since 1.5
29  */

30 @Documented JavaDoc
31 @Retention JavaDoc(RetentionPolicy.RUNTIME)
32 @Target JavaDoc(ElementType.ANNOTATION_TYPE)
33 public @interface Inherited {
34 }
35
Popular Tags