Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/src/share/classes/jdk/Exported.java
38828 views
/*1* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package jdk;2627import java.lang.annotation.*;2829/**30* Indicates whether or not a JDK specific type or package is an31* exported part of the JDK suitable for use outside of the JDK32* implementation itself.33*34* This annotation should only be applied to types and packages35* <em>outside</em> of the Java SE namespaces of {@code java.*} and36* {@code javax.*} packages. For example, certain portions of {@code37* com.sun.*} are official parts of the JDK meant to be generally38* usable while other portions of {@code com.sun.*} are not. This39* annotation type allows those portions to be easily and40* programmatically distinguished.41*42* <p>If in one release a type or package is43* <code>@Exported(true)</code>, in a subsequent major release such a44* type or package can transition to <code>@Exported(false)</code>.45*46* <p>If a type or package is <code>@Exported(false)</code> in a47* release, it may be removed in a subsequent major release.48*49* <p>If a top-level type has an <code>@Exported</code> annotation,50* any nested member types with the top-level type should have an51* <code>@Exported</code> annotation with the same value.52*53* (In exceptional cases, if a nested type is going to be removed54* before its enclosing type, the nested type's could be55* <code>@Exported(false)</code> while its enclosing type was56* <code>@Exported(true)</code>.)57*58* Likewise, if a package has an <code>@Exported</code> annotation,59* top-level types within that package should also have an60* <code>@Exported</code> annotation.61*62* Sometimes a top-level type may have a different63* <code>@Exported</code> value than its package.64*65* @since 1.866*/67@Documented68@Retention(RetentionPolicy.RUNTIME)69@Target({ElementType.TYPE, ElementType.PACKAGE})70@Exported71public @interface Exported {72/**73* Whether or not the annotated type or package is an exported part of the JDK.74*/75boolean value() default true;76}777879