jdk/src/share/classes/java/lang/annotation/Repeatable.java
author jfranck
Mon, 30 Sep 2013 11:18:18 +0200
changeset 20481 2735b307d256
parent 18546 862067c6481c
permissions -rw-r--r--
8007072: Update Core Reflection for Type Annotations to match latest spec 8022324: j.l.Class.getAnnotatedInterfaces() for array type returns wrong value 8024915: j.l.r.Executable.getAnnotatedReceiverType() should return null for static methods Summary: Update javadoc and implementation of reflection for type annotations to match latest spec Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15017
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
     1
/*
18546
862067c6481c 8017550: Fix doclint issues in java.lang and subpackages
darcy
parents: 15017
diff changeset
     2
 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
15017
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
     4
 *
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    10
 *
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    15
 * accompanied this code).
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    16
 *
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    20
 *
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    23
 * questions.
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    24
 */
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    25
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    26
package java.lang.annotation;
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    27
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    28
/**
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    29
 * The annotation type {@code java.lang.annotation.Repeatable} is
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    30
 * used to indicate that the annotation type whose declaration it
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    31
 * (meta-)annotates is <em>repeatable</em>. The value of
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    32
 * {@code @Repeatable} indicates the <em>containing annotation
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    33
 * type</em> for the repeatable annotation type.
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    34
 *
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    35
 * @since 1.8
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    36
 * @jls 9.6 Annotation Types
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    37
 * @jls 9.7 Annotations
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    38
 */
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    39
@Documented
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    40
@Retention(RetentionPolicy.RUNTIME)
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    41
@Target(ElementType.ANNOTATION_TYPE)
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    42
public @interface Repeatable {
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    43
    /**
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    44
     * Indicates the <em>containing annotation type</em> for the
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    45
     * repeatable annotation type.
18546
862067c6481c 8017550: Fix doclint issues in java.lang and subpackages
darcy
parents: 15017
diff changeset
    46
     * @return the containing annotation type
15017
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    47
     */
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    48
    Class<? extends Annotation> value();
f06faf784dde 8005713: Simplify library support for repeating annotations in java.lang.annotation
darcy
parents:
diff changeset
    49
}