< prev index next >

src/java.base/share/classes/java/lang/annotation/AnnotationFormatError.java

Print this page




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.lang.annotation;
  27 
  28 /**
  29  * Thrown when the annotation parser attempts to read an annotation
  30  * from a class file and determines that the annotation is malformed.
  31  * This error can be thrown by the {@linkplain
  32  * java.lang.reflect.AnnotatedElement API used to read annotations
  33  * reflectively}.
  34  *
  35  * @author  Josh Bloch
  36  * @see     java.lang.reflect.AnnotatedElement
  37  * @since   1.5
  38  */
  39 public class AnnotationFormatError extends Error {

  40     private static final long serialVersionUID = -4256701562333669892L;
  41 
  42     /**
  43      * Constructs a new {@code AnnotationFormatError} with the specified
  44      * detail message.
  45      *
  46      * @param   message   the detail message.
  47      */
  48     public AnnotationFormatError(String message) {
  49         super(message);
  50     }
  51 
  52     /**
  53      * Constructs a new {@code AnnotationFormatError} with the specified
  54      * detail message and cause.  Note that the detail message associated
  55      * with {@code cause} is <i>not</i> automatically incorporated in
  56      * this error's detail message.
  57      *
  58      * @param  message the detail message
  59      * @param  cause the cause (A {@code null} value is permitted, and


  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.lang.annotation;
  27 
  28 /**
  29  * Thrown when the annotation parser attempts to read an annotation
  30  * from a class file and determines that the annotation is malformed.
  31  * This error can be thrown by the {@linkplain
  32  * java.lang.reflect.AnnotatedElement API used to read annotations
  33  * reflectively}.
  34  *
  35  * @author  Josh Bloch
  36  * @see     java.lang.reflect.AnnotatedElement
  37  * @since   1.5
  38  */
  39 public class AnnotationFormatError extends Error {
  40     @java.io.Serial
  41     private static final long serialVersionUID = -4256701562333669892L;
  42 
  43     /**
  44      * Constructs a new {@code AnnotationFormatError} with the specified
  45      * detail message.
  46      *
  47      * @param   message   the detail message.
  48      */
  49     public AnnotationFormatError(String message) {
  50         super(message);
  51     }
  52 
  53     /**
  54      * Constructs a new {@code AnnotationFormatError} with the specified
  55      * detail message and cause.  Note that the detail message associated
  56      * with {@code cause} is <i>not</i> automatically incorporated in
  57      * this error's detail message.
  58      *
  59      * @param  message the detail message
  60      * @param  cause the cause (A {@code null} value is permitted, and
< prev index next >