author | roland |
Thu, 08 Jan 2015 11:00:38 +0100 | |
changeset 28486 | b0df113b962e |
parent 25874 | 83c19f00452c |
permissions | -rw-r--r-- |
15563
7f7adda30698
8001614: Include annotation type to documented supported-ness
darcy
parents:
diff
changeset
|
1 |
/* |
25451 | 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 | 31 |
* Indicates whether or not a JDK specific type or package is an |
32 |
* exported part of the JDK suitable for use outside of the JDK |
|
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 | 41 |
* programmatically distinguished. |
42 |
* |
|
43 |
* <p>If in one release a type or package is |
|
44 |
* <code>@Exported(true)</code>, in a subsequent major release such a |
|
45 |
* type or package can transition to <code>@Exported(false)</code>. |
|
46 |
* |
|
47 |
* <p>If a type or package is <code>@Exported(false)</code> in a |
|
48 |
* release, it may be removed in a subsequent major release. |
|
49 |
* |
|
50 |
* <p>If a top-level type has an <code>@Exported</code> annotation, |
|
51 |
* any nested member types with the top-level type should have an |
|
52 |
* <code>@Exported</code> annotation with the same value. |
|
53 |
* |
|
54 |
* (In exceptional cases, if a nested type is going to be removed |
|
55 |
* before its enclosing type, the nested type's could be |
|
56 |
* <code>@Exported(false)</code> while its enclosing type was |
|
57 |
* <code>@Exported(true)</code>.) |
|
58 |
* |
|
59 |
* Likewise, if a package has an <code>@Exported</code> annotation, |
|
60 |
* top-level types within that package should also have an |
|
61 |
* <code>@Exported</code> annotation. |
|
62 |
* |
|
63 |
* Sometimes a top-level type may have a different |
|
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 | 71 |
@Exported |
72 |
public @interface Exported { |
|
15563
7f7adda30698
8001614: Include annotation type to documented supported-ness
darcy
parents:
diff
changeset
|
73 |
/** |
25451 | 74 |
* Whether or not the annotated type or package is an exported |
75 |
* part of the JDK. |
|
76 |
* @return whether or not the annotated type or package is an exported |
|
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 |
} |