1. /*
  2. * @(#)AnnotationFormatError.java 1.1 04/02/03
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.lang.annotation;
  8. /**
  9. * Thrown when the annotation parser attempts to read an annotation
  10. * from a class file and determines that the annotation is malformed.
  11. *
  12. * @author Josh Bloch
  13. * @since 1.5
  14. */
  15. public class AnnotationFormatError extends Error {
  16. /**
  17. * Constructs a new <tt>AnnotationFormatError</tt> with the specified
  18. * detail message.
  19. *
  20. * @param message the detail message.
  21. */
  22. public AnnotationFormatError(String message) {
  23. super(message);
  24. }
  25. /**
  26. * Constructs a new <tt>AnnotationFormatError</tt> with the specified
  27. * detail message and cause. Note that the detail message associated
  28. * with <code>cause</code> is <i>not</i> automatically incorporated in
  29. * this error's detail message.
  30. *
  31. * @param message the detail message
  32. * @param cause the cause (A <tt>null</tt> value is permitted, and
  33. * indicates that the cause is nonexistent or unknown.)
  34. */
  35. public AnnotationFormatError(String message, Throwable cause) {
  36. super(message, cause);
  37. }
  38. /**
  39. * Constructs a new <tt>AnnotationFormatError</tt> with the specified
  40. * cause and a detail message of
  41. * <tt>(cause == null ? null : cause.toString())</tt> (which
  42. * typically contains the class and detail message of <tt>cause</tt>).
  43. *
  44. * @param cause the cause (A <tt>null</tt> value is permitted, and
  45. * indicates that the cause is nonexistent or unknown.)
  46. */
  47. public AnnotationFormatError(Throwable cause) {
  48. super(cause);
  49. }
  50. }