10
|
1 |
/*
|
5520
|
2 |
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
|
10
|
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
|
5520
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
10
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
5520
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
10
|
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 |
*
|
5520
|
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.
|
10
|
24 |
*/
|
|
25 |
|
|
26 |
package com.sun.javadoc;
|
|
27 |
|
|
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 {
|
|
35 |
|
|
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();
|
|
51 |
|
|
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();
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Return true if this method is native
|
|
64 |
*/
|
|
65 |
boolean isNative();
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Return true if this method is synchronized
|
|
69 |
*/
|
|
70 |
boolean isSynchronized();
|
|
71 |
|
|
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();
|
|
79 |
|
|
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();
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Return the throws tags in this method.
|
|
92 |
*
|
|
93 |
* @return an array of ThrowTag containing all <code>@exception</code>
|
|
94 |
* and <code>@throws</code> tags.
|
|
95 |
*/
|
|
96 |
ThrowsTag[] throwsTags();
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Return the param tags in this method, excluding the type
|
|
100 |
* parameter tags.
|
|
101 |
*
|
|
102 |
* @return an array of ParamTag containing all <code>@param</code> tags
|
|
103 |
* corresponding to the parameters of this method.
|
|
104 |
*/
|
|
105 |
ParamTag[] paramTags();
|
|
106 |
|
|
107 |
/**
|
|
108 |
* Return the type parameter tags in this method.
|
|
109 |
*
|
|
110 |
* @return an array of ParamTag containing all <code>@param</code> tags
|
|
111 |
* corresponding to the type parameters of this method.
|
|
112 |
* @since 1.5
|
|
113 |
*/
|
|
114 |
ParamTag[] typeParamTags();
|
|
115 |
|
|
116 |
/**
|
|
117 |
* Get the signature. It is the parameter list, type is qualified.
|
|
118 |
* For instance, for a method <code>mymethod(String x, int y)</code>,
|
|
119 |
* it will return <code>(java.lang.String,int)</code>.
|
|
120 |
*/
|
|
121 |
String signature();
|
|
122 |
|
|
123 |
/**
|
|
124 |
* get flat signature. all types are not qualified.
|
|
125 |
* return a String, which is the flat signiture of this member.
|
|
126 |
* It is the parameter list, type is not qualified.
|
|
127 |
* For instance, for a method <code>mymethod(String x, int y)</code>,
|
|
128 |
* it will return <code>(String, int)</code>.
|
|
129 |
*/
|
|
130 |
String flatSignature();
|
|
131 |
|
|
132 |
/**
|
|
133 |
* Return the formal type parameters of this method or constructor.
|
|
134 |
* Return an empty array if this method or constructor is not generic.
|
|
135 |
*
|
|
136 |
* @return the formal type parameters of this method or constructor.
|
|
137 |
* @since 1.5
|
|
138 |
*/
|
|
139 |
TypeVariable[] typeParameters();
|
|
140 |
}
|