8026984: Clarity intended use of jdk.Exported
authordarcy
Mon, 21 Oct 2013 15:37:11 -0700
changeset 21484 c64ceb9090aa
parent 21483 bda04738a55a
child 21485 2759750a8cdf
8026984: Clarity intended use of jdk.Exported Reviewed-by: psandoz, mr, alanb
langtools/src/share/classes/jdk/Exported.java
--- a/langtools/src/share/classes/jdk/Exported.java	Mon Oct 21 15:55:02 2013 +0100
+++ b/langtools/src/share/classes/jdk/Exported.java	Mon Oct 21 15:37:11 2013 -0700
@@ -38,7 +38,30 @@
   * com.sun.*} are official parts of the JDK meant to be generally
   * usable while other portions of {@code com.sun.*} are not.  This
   * annotation type allows those portions to be easily and
-  * programmaticly distinguished.
+  * programmatically distinguished.
+  *
+  * <p>If in one release a type or package is
+  * <code>@Exported(true)</code>, in a subsequent major release such a
+  * type or package can transition to <code>@Exported(false)</code>.
+  *
+  * <p>If a type or package is <code>@Exported(false)</code> in a
+  * release, it may be removed in a subsequent major release.
+  *
+  * <p>If a top-level type has an <code>@Exported</code> annotation,
+  * any nested member types with the top-level type should have an
+  * <code>@Exported</code> annotation with the same value.
+  *
+  * (In exceptional cases, if a nested type is going to be removed
+  * before its enclosing type, the nested type's could be
+  * <code>@Exported(false)</code> while its enclosing type was
+  * <code>@Exported(true)</code>.)
+  *
+  * Likewise, if a package has an <code>@Exported</code> annotation,
+  * top-level types within that package should also have an
+  * <code>@Exported</code> annotation.
+  *
+  * Sometimes a top-level type may have a different
+  * <code>@Exported</code> value than its package.
   *
   * @since 1.8
   */