rt/emul/compact/src/main/java/java/lang/annotation/Inherited.java
author Jaroslav Tulach <jtulach@netbeans.org>
Mon, 21 Oct 2013 14:38:36 +0200
branchjdk7-b147
changeset 1379 b5f9d743a090
permissions -rw-r--r--
Adding annotation classes into the emulation layer
jtulach@1379
     1
/*
jtulach@1379
     2
 * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
jtulach@1379
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jtulach@1379
     4
 *
jtulach@1379
     5
 * This code is free software; you can redistribute it and/or modify it
jtulach@1379
     6
 * under the terms of the GNU General Public License version 2 only, as
jtulach@1379
     7
 * published by the Free Software Foundation.  Oracle designates this
jtulach@1379
     8
 * particular file as subject to the "Classpath" exception as provided
jtulach@1379
     9
 * by Oracle in the LICENSE file that accompanied this code.
jtulach@1379
    10
 *
jtulach@1379
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
jtulach@1379
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jtulach@1379
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
jtulach@1379
    14
 * version 2 for more details (a copy is included in the LICENSE file that
jtulach@1379
    15
 * accompanied this code).
jtulach@1379
    16
 *
jtulach@1379
    17
 * You should have received a copy of the GNU General Public License version
jtulach@1379
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
jtulach@1379
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jtulach@1379
    20
 *
jtulach@1379
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jtulach@1379
    22
 * or visit www.oracle.com if you need additional information or have any
jtulach@1379
    23
 * questions.
jtulach@1379
    24
 */
jtulach@1379
    25
jtulach@1379
    26
package java.lang.annotation;
jtulach@1379
    27
jtulach@1379
    28
/**
jtulach@1379
    29
 * Indicates that an annotation type is automatically inherited.  If
jtulach@1379
    30
 * an Inherited meta-annotation is present on an annotation type
jtulach@1379
    31
 * declaration, and the user queries the annotation type on a class
jtulach@1379
    32
 * declaration, and the class declaration has no annotation for this type,
jtulach@1379
    33
 * then the class's superclass will automatically be queried for the
jtulach@1379
    34
 * annotation type.  This process will be repeated until an annotation for this
jtulach@1379
    35
 * type is found, or the top of the class hierarchy (Object)
jtulach@1379
    36
 * is reached.  If no superclass has an annotation for this type, then
jtulach@1379
    37
 * the query will indicate that the class in question has no such annotation.
jtulach@1379
    38
 *
jtulach@1379
    39
 * <p>Note that this meta-annotation type has no effect if the annotated
jtulach@1379
    40
 * type is used to annotate anything other than a class.  Note also
jtulach@1379
    41
 * that this meta-annotation only causes annotations to be inherited
jtulach@1379
    42
 * from superclasses; annotations on implemented interfaces have no
jtulach@1379
    43
 * effect.
jtulach@1379
    44
 *
jtulach@1379
    45
 * @author  Joshua Bloch
jtulach@1379
    46
 * @since 1.5
jtulach@1379
    47
 */
jtulach@1379
    48
@Documented
jtulach@1379
    49
@Retention(RetentionPolicy.RUNTIME)
jtulach@1379
    50
@Target(ElementType.ANNOTATION_TYPE)
jtulach@1379
    51
public @interface Inherited {
jtulach@1379
    52
}