langtools/src/java.base/share/classes/jdk/Exported.java
author roland
Thu, 08 Jan 2015 11:00:38 +0100
changeset 28486 b0df113b962e
parent 25874 83c19f00452c
permissions -rw-r--r--
8027626: assert(Opcode() != Op_If || outcnt() == 2) failed: bad if #1 Summary: IGVN encounters IfNode with single projection when optimizing dying subgraph Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15563
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
     1
/*
25451
6f24a67dfac5 8050086: jdk.Exported is missing @return
darcy
parents: 21484
diff changeset
     2
 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
15563
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
     4
 *
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    10
 *
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    15
 * accompanied this code).
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    16
 *
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    20
 *
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    23
 * questions.
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    24
 */
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    25
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    26
package jdk;
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    27
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    28
import java.lang.annotation.*;
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    29
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    30
/**
20612
4761f3ff7afb 8025913: Rename jdk.Supported to jdk.Exported
darcy
parents: 15563
diff changeset
    31
  * Indicates whether or not a JDK specific type or package is an
4761f3ff7afb 8025913: Rename jdk.Supported to jdk.Exported
darcy
parents: 15563
diff changeset
    32
  * exported part of the JDK suitable for use outside of the JDK
4761f3ff7afb 8025913: Rename jdk.Supported to jdk.Exported
darcy
parents: 15563
diff changeset
    33
  * implementation itself.
15563
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    34
  *
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    35
  * This annotation should only be applied to types and packages
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    36
  * <em>outside</em> of the Java SE namespaces of {@code java.*} and
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    37
  * {@code javax.*} packages.  For example, certain portions of {@code
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    38
  * com.sun.*} are official parts of the JDK meant to be generally
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    39
  * usable while other portions of {@code com.sun.*} are not.  This
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    40
  * annotation type allows those portions to be easily and
21484
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    41
  * programmatically distinguished.
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    42
  *
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    43
  * <p>If in one release a type or package is
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    44
  * <code>@Exported(true)</code>, in a subsequent major release such a
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    45
  * type or package can transition to <code>@Exported(false)</code>.
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    46
  *
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    47
  * <p>If a type or package is <code>@Exported(false)</code> in a
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    48
  * release, it may be removed in a subsequent major release.
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    49
  *
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    50
  * <p>If a top-level type has an <code>@Exported</code> annotation,
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    51
  * any nested member types with the top-level type should have an
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    52
  * <code>@Exported</code> annotation with the same value.
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    53
  *
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    54
  * (In exceptional cases, if a nested type is going to be removed
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    55
  * before its enclosing type, the nested type's could be
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    56
  * <code>@Exported(false)</code> while its enclosing type was
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    57
  * <code>@Exported(true)</code>.)
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    58
  *
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    59
  * Likewise, if a package has an <code>@Exported</code> annotation,
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    60
  * top-level types within that package should also have an
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    61
  * <code>@Exported</code> annotation.
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    62
  *
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    63
  * Sometimes a top-level type may have a different
c64ceb9090aa 8026984: Clarity intended use of jdk.Exported
darcy
parents: 20612
diff changeset
    64
  * <code>@Exported</code> value than its package.
15563
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    65
  *
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    66
  * @since 1.8
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    67
  */
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    68
@Documented
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    69
@Retention(RetentionPolicy.RUNTIME)
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    70
@Target({ElementType.TYPE, ElementType.PACKAGE})
20612
4761f3ff7afb 8025913: Rename jdk.Supported to jdk.Exported
darcy
parents: 15563
diff changeset
    71
@Exported
4761f3ff7afb 8025913: Rename jdk.Supported to jdk.Exported
darcy
parents: 15563
diff changeset
    72
public @interface Exported {
15563
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    73
    /**
25451
6f24a67dfac5 8050086: jdk.Exported is missing @return
darcy
parents: 21484
diff changeset
    74
     * Whether or not the annotated type or package is an exported
6f24a67dfac5 8050086: jdk.Exported is missing @return
darcy
parents: 21484
diff changeset
    75
     * part of the JDK.
6f24a67dfac5 8050086: jdk.Exported is missing @return
darcy
parents: 21484
diff changeset
    76
     * @return whether or not the annotated type or package is an exported
6f24a67dfac5 8050086: jdk.Exported is missing @return
darcy
parents: 21484
diff changeset
    77
     * part of the JDK
15563
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    78
     */
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    79
    boolean value() default true;
7f7adda30698 8001614: Include annotation type to documented supported-ness
darcy
parents:
diff changeset
    80
}