Tue, 22 Oct 2013 17:42:10 -0700
8027119: Cleanup javadoc comments for taglet API
Reviewed-by: mduigou
1 /*
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
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 */
26 package com.sun.javadoc;
28 /**
29 * Represents a method or constructor of a java class.
30 *
31 * @since 1.2
32 * @author Robert Field
33 */
34 public interface ExecutableMemberDoc extends MemberDoc {
36 /**
37 * Return exceptions this method or constructor throws.
38 * If the type of the exception is a type variable, return the
39 * <code>ClassDoc</code> of its erasure.
40 *
41 * <p> <i>The <code>thrownExceptions</code> method cannot
42 * accommodate certain generic type constructs. The
43 * <code>thrownExceptionTypes</code> method should be used
44 * instead.</i>
45 *
46 * @return an array of ClassDoc[] representing the exceptions
47 * thrown by this method.
48 * @see #thrownExceptionTypes
49 */
50 ClassDoc[] thrownExceptions();
52 /**
53 * Return exceptions this method or constructor throws.
54 *
55 * @return an array representing the exceptions thrown by this method.
56 * Each array element is either a <code>ClassDoc</code> or a
57 * <code>TypeVariable</code>.
58 * @since 1.5
59 */
60 Type[] thrownExceptionTypes();
62 /**
63 * Return true if this method is native
64 */
65 boolean isNative();
67 /**
68 * Return true if this method is synchronized
69 */
70 boolean isSynchronized();
72 /**
73 * Return true if this method was declared to take a variable number
74 * of arguments.
75 *
76 * @since 1.5
77 */
78 public boolean isVarArgs();
80 /**
81 * Get argument information.
82 *
83 * @see Parameter
84 *
85 * @return an array of Parameter, one element per argument
86 * in the order the arguments are present.
87 */
88 Parameter[] parameters();
90 /**
91 * Get the receiver type of this executable element.
92 *
93 * @return the receiver type of this executable element.
94 * @since 1.8
95 */
96 Type receiverType();
98 /**
99 * Return the throws tags in this method.
100 *
101 * @return an array of ThrowTag containing all <code>@exception</code>
102 * and <code>@throws</code> tags.
103 */
104 ThrowsTag[] throwsTags();
106 /**
107 * Return the param tags in this method, excluding the type
108 * parameter tags.
109 *
110 * @return an array of ParamTag containing all <code>@param</code> tags
111 * corresponding to the parameters of this method.
112 */
113 ParamTag[] paramTags();
115 /**
116 * Return the type parameter tags in this method.
117 *
118 * @return an array of ParamTag containing all <code>@param</code> tags
119 * corresponding to the type parameters of this method.
120 * @since 1.5
121 */
122 ParamTag[] typeParamTags();
124 /**
125 * Get the signature. It is the parameter list, type is qualified.
126 * For instance, for a method <code>mymethod(String x, int y)</code>,
127 * it will return <code>(java.lang.String,int)</code>.
128 */
129 String signature();
131 /**
132 * get flat signature. all types are not qualified.
133 * return a String, which is the flat signiture of this member.
134 * It is the parameter list, type is not qualified.
135 * For instance, for a method <code>mymethod(String x, int y)</code>,
136 * it will return <code>(String, int)</code>.
137 */
138 String flatSignature();
140 /**
141 * Return the formal type parameters of this method or constructor.
142 * Return an empty array if this method or constructor is not generic.
143 *
144 * @return the formal type parameters of this method or constructor.
145 * @since 1.5
146 */
147 TypeVariable[] typeParameters();
148 }