提交 09ae3ed3 编写于 作者: D darcy

6378701: (enum) Unclear purpose of EnumConstantNotPresentException

Reviewed-by: lancea, andrew, alanb
上级 9ebf0f88
...@@ -28,8 +28,12 @@ package java.lang; ...@@ -28,8 +28,12 @@ package java.lang;
/** /**
* Thrown when an application tries to access an enum constant by name * Thrown when an application tries to access an enum constant by name
* and the enum type contains no constant with the specified 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 * @author Josh Bloch
* @see java.lang.reflect.AnnotatedElement
* @since 1.5 * @since 1.5
*/ */
public class EnumConstantNotPresentException extends RuntimeException { public class EnumConstantNotPresentException extends RuntimeException {
......
...@@ -35,8 +35,12 @@ package java.lang; ...@@ -35,8 +35,12 @@ package java.lang;
* <p>Note that this exception may be used when undefined type variables * <p>Note that this exception may be used when undefined type variables
* are accessed as well as when types (e.g., classes, interfaces or * are accessed as well as when types (e.g., classes, interfaces or
* annotation types) are loaded. * 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 * @author Josh Bloch
* @see java.lang.reflect.AnnotatedElement
* @since 1.5 * @since 1.5
*/ */
public class TypeNotPresentException extends RuntimeException { public class TypeNotPresentException extends RuntimeException {
......
...@@ -28,8 +28,12 @@ package java.lang.annotation; ...@@ -28,8 +28,12 @@ package java.lang.annotation;
/** /**
* Thrown when the annotation parser attempts to read an annotation * Thrown when the annotation parser attempts to read an annotation
* from a class file and determines that the annotation is malformed. * 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 * @author Josh Bloch
* @see java.lang.reflect.AnnotatedElement
* @since 1.5 * @since 1.5
*/ */
public class AnnotationFormatError extends Error { public class AnnotationFormatError extends Error {
......
...@@ -30,8 +30,12 @@ import java.lang.reflect.Method; ...@@ -30,8 +30,12 @@ import java.lang.reflect.Method;
* Thrown to indicate that a program has attempted to access an element of * Thrown to indicate that a program has attempted to access an element of
* an annotation whose type has changed after the annotation was compiled * an annotation whose type has changed after the annotation was compiled
* (or serialized). * (or serialized).
* This exception can be thrown by the {@linkplain
* java.lang.reflect.AnnotatedElement API used to read annotations
* reflectively}.
* *
* @author Josh Bloch * @author Josh Bloch
* @see java.lang.reflect.AnnotatedElement
* @since 1.5 * @since 1.5
*/ */
public class AnnotationTypeMismatchException extends RuntimeException { public class AnnotationTypeMismatchException extends RuntimeException {
......
...@@ -30,8 +30,12 @@ package java.lang.annotation; ...@@ -30,8 +30,12 @@ package java.lang.annotation;
* an annotation type that was added to the annotation type definition after * an annotation type that was added to the annotation type definition after
* the annotation was compiled (or serialized). This exception will not be * the annotation was compiled (or serialized). This exception will not be
* thrown if the new element has a default value. * 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 * @author Josh Bloch
* @see java.lang.reflect.AnnotatedElement
* @since 1.5 * @since 1.5
*/ */
public class IncompleteAnnotationException extends RuntimeException { public class IncompleteAnnotationException extends RuntimeException {
......
...@@ -50,6 +50,11 @@ import java.lang.annotation.Annotation; ...@@ -50,6 +50,11 @@ import java.lang.annotation.Annotation;
* java.lang.annotation.AnnotationTypeMismatchException} or an * java.lang.annotation.AnnotationTypeMismatchException} or an
* {@link java.lang.annotation.IncompleteAnnotationException}. * {@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 * @since 1.5
* @author Josh Bloch * @author Josh Bloch
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册