6378701: (enum) Unclear purpose of EnumConstantNotPresentException
authordarcy
Fri, 21 Aug 2009 11:31:18 -0700
changeset 3630 28237c1f0c41
parent 3629 6035eed86b12
child 3633 e86b5b8235fb
6378701: (enum) Unclear purpose of EnumConstantNotPresentException Reviewed-by: lancea, andrew, alanb
jdk/src/share/classes/java/lang/EnumConstantNotPresentException.java
jdk/src/share/classes/java/lang/TypeNotPresentException.java
jdk/src/share/classes/java/lang/annotation/AnnotationFormatError.java
jdk/src/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java
jdk/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java
jdk/src/share/classes/java/lang/reflect/AnnotatedElement.java
--- a/jdk/src/share/classes/java/lang/EnumConstantNotPresentException.java	Thu Aug 20 08:48:29 2009 +0100
+++ b/jdk/src/share/classes/java/lang/EnumConstantNotPresentException.java	Fri Aug 21 11:31:18 2009 -0700
@@ -28,8 +28,12 @@
 /**
  * Thrown when an application tries to access an enum constant by name
  * and the enum type contains no constant with the specified name.
+ * This exception can be thrown by the {@linkplain
+ * java.lang.reflect.AnnotatedElement API used to read annotations
+ * reflectively}.
  *
  * @author  Josh Bloch
+ * @see     java.lang.reflect.AnnotatedElement
  * @since   1.5
  */
 public class EnumConstantNotPresentException extends RuntimeException {
--- a/jdk/src/share/classes/java/lang/TypeNotPresentException.java	Thu Aug 20 08:48:29 2009 +0100
+++ b/jdk/src/share/classes/java/lang/TypeNotPresentException.java	Fri Aug 21 11:31:18 2009 -0700
@@ -35,8 +35,12 @@
  * <p>Note that this exception may be used when undefined type variables
  * are accessed as well as when types (e.g., classes, interfaces or
  * annotation types) are loaded.
+ * In particular, this exception can be thrown by the {@linkplain
+ * java.lang.reflect.AnnotatedElement API used to read annotations
+ * reflectively}.
  *
  * @author  Josh Bloch
+ * @see     java.lang.reflect.AnnotatedElement
  * @since 1.5
  */
 public class TypeNotPresentException extends RuntimeException {
--- a/jdk/src/share/classes/java/lang/annotation/AnnotationFormatError.java	Thu Aug 20 08:48:29 2009 +0100
+++ b/jdk/src/share/classes/java/lang/annotation/AnnotationFormatError.java	Fri Aug 21 11:31:18 2009 -0700
@@ -28,8 +28,12 @@
 /**
  * Thrown when the annotation parser attempts to read an annotation
  * from a class file and determines that the annotation is malformed.
+ * This error can be thrown by the {@linkplain
+ * java.lang.reflect.AnnotatedElement API used to read annotations
+ * reflectively}.
  *
  * @author  Josh Bloch
+ * @see     java.lang.reflect.AnnotatedElement
  * @since   1.5
  */
 public class AnnotationFormatError extends Error {
--- a/jdk/src/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java	Thu Aug 20 08:48:29 2009 +0100
+++ b/jdk/src/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java	Fri Aug 21 11:31:18 2009 -0700
@@ -30,8 +30,12 @@
  * Thrown to indicate that a program has attempted to access an element of
  * an annotation whose type has changed after the annotation was compiled
  * (or serialized).
+ * This exception can be thrown by the {@linkplain
+ * java.lang.reflect.AnnotatedElement API used to read annotations
+ * reflectively}.
  *
  * @author  Josh Bloch
+ * @see     java.lang.reflect.AnnotatedElement
  * @since 1.5
  */
 public class AnnotationTypeMismatchException extends RuntimeException {
--- a/jdk/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java	Thu Aug 20 08:48:29 2009 +0100
+++ b/jdk/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java	Fri Aug 21 11:31:18 2009 -0700
@@ -30,8 +30,12 @@
  * an annotation type that was added to the annotation type definition after
  * the annotation was compiled (or serialized).  This exception will not be
  * thrown if the new element has a default value.
+ * This exception can be thrown by the {@linkplain
+ * java.lang.reflect.AnnotatedElement API used to read annotations
+ * reflectively}.
  *
  * @author  Josh Bloch
+ * @see     java.lang.reflect.AnnotatedElement
  * @since 1.5
  */
 public class IncompleteAnnotationException extends RuntimeException {
--- a/jdk/src/share/classes/java/lang/reflect/AnnotatedElement.java	Thu Aug 20 08:48:29 2009 +0100
+++ b/jdk/src/share/classes/java/lang/reflect/AnnotatedElement.java	Fri Aug 21 11:31:18 2009 -0700
@@ -50,6 +50,11 @@
  * java.lang.annotation.AnnotationTypeMismatchException} or an
  * {@link java.lang.annotation.IncompleteAnnotationException}.
  *
+ * @see java.lang.EnumConstantNotPresentException
+ * @see java.lang.TypeNotPresentException
+ * @see java.lang.annotation.AnnotationFormatError
+ * @see java.lang.annotation.AnnotationTypeMismatchException
+ * @see java.lang.annotation.IncompleteAnnotationException
  * @since 1.5
  * @author Josh Bloch
  */