1. /*
  2. * @(#)ThrowsTag.java 1.9 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.javadoc;
  8. /**
  9. * Represents a @throws or @exception documentation tag.
  10. * Parses and holds the exception name and exception comment.
  11. * Note: @exception is a backwards compatible synonymy for @throws.
  12. *
  13. * @author Robert Field
  14. * @author Atul M Dambalkar
  15. * @see ExecutableMemberDoc#throwsTags()
  16. *
  17. */
  18. public interface ThrowsTag extends Tag {
  19. /**
  20. * Return the name of the exception
  21. * associated with this <code>ThrowsTag</code>.
  22. *
  23. * @return name of the exception.
  24. */
  25. String exceptionName();
  26. /**
  27. * Return the exception comment
  28. * associated with this <code>ThrowsTag</code>.
  29. *
  30. * @return exception comment.
  31. */
  32. String exceptionComment();
  33. /**
  34. * Return a <code>ClassDoc</code> that represents the exception.
  35. * If the type of the exception is a type variable, return the
  36. * <code>ClassDoc</code> of its erasure.
  37. *
  38. * <p> <i>This method cannot accommodate certain generic type
  39. * constructs. The <code>exceptionType</code> method
  40. * should be used instead.</i>
  41. *
  42. * @return <code>ClassDoc</code> that represents the exception.
  43. * @see #exceptionType
  44. */
  45. ClassDoc exception();
  46. /**
  47. * Return the type of the exception
  48. * associated with this <code>ThrowsTag</code>.
  49. * This may be a <code>ClassDoc</code> or a <code>TypeVariable</code>.
  50. *
  51. * @return the type of the exception.
  52. * @since 1.5
  53. */
  54. Type exceptionType();
  55. }