1. /*
  2. * @(#)ExecutableMemberDoc.java 1.8 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 method or constructor of a java class.
  10. *
  11. * @since JDK1.2
  12. * @author Robert Field
  13. */
  14. public interface ExecutableMemberDoc extends MemberDoc {
  15. /**
  16. * Return exceptions this method or constructor throws.
  17. * If the type of the exception is a type variable, return the
  18. * <code>ClassDoc</code> of its erasure.
  19. *
  20. * <p> <i>The <code>thrownExceptions</code> method cannot
  21. * accommodate certain generic type constructs. The
  22. * <code>thrownExceptionTypes</code> method should be used
  23. * instead.</i>
  24. *
  25. * @return an array of ClassDoc[] representing the exceptions
  26. * thrown by this method.
  27. * @see #thrownExceptionTypes
  28. */
  29. ClassDoc[] thrownExceptions();
  30. /**
  31. * Return exceptions this method or constructor throws.
  32. *
  33. * @return an array representing the exceptions thrown by this method.
  34. * Each array element is either a <code>ClassDoc</code> or a
  35. * <code>TypeVariable</code>.
  36. * @since 1.5
  37. */
  38. Type[] thrownExceptionTypes();
  39. /**
  40. * Return true if this method is native
  41. */
  42. boolean isNative();
  43. /**
  44. * Return true if this method is synchronized
  45. */
  46. boolean isSynchronized();
  47. /**
  48. * Return true if this method was declared to take a variable number
  49. * of arguments.
  50. *
  51. * @since 1.5
  52. */
  53. public boolean isVarArgs();
  54. /**
  55. * Get argument information.
  56. *
  57. * @see Parameter
  58. *
  59. * @return an array of Parameter, one element per argument
  60. * in the order the arguments are present.
  61. */
  62. Parameter[] parameters();
  63. /**
  64. * Return the throws tags in this method.
  65. *
  66. * @return an array of ThrowTag containing all <code>@exception</code>
  67. * and <code>@throws</code> tags.
  68. */
  69. ThrowsTag[] throwsTags();
  70. /**
  71. * Return the param tags in this method, excluding the type
  72. * parameter tags.
  73. *
  74. * @return an array of ParamTag containing all <code>@param</code> tags
  75. * corresponding to the parameters of this method.
  76. */
  77. ParamTag[] paramTags();
  78. /**
  79. * Return the type parameter tags in this method.
  80. *
  81. * @return an array of ParamTag containing all <code>@param</code> tags
  82. * corresponding to the type parameters of this method.
  83. * @since 1.5
  84. */
  85. ParamTag[] typeParamTags();
  86. /**
  87. * Get the signature. It is the parameter list, type is qualified.
  88. * For instance, for a method <code>mymethod(String x, int y)</code>,
  89. * it will return <code>(java.lang.String,int)</code>.
  90. */
  91. String signature();
  92. /**
  93. * get flat signature. all types are not qualified.
  94. * return a String, which is the flat signiture of this member.
  95. * It is the parameter list, type is not qualified.
  96. * For instance, for a method <code>mymethod(String x, int y)</code>,
  97. * it will return <code>(String, int)</code>.
  98. */
  99. String flatSignature();
  100. /**
  101. * Return the formal type parameters of this method or constructor.
  102. * Return an empty array if this method or constructor is not generic.
  103. *
  104. * @return the formal type parameters of this method or constructor.
  105. * @since 1.5
  106. */
  107. TypeVariable[] typeParameters();
  108. }