KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ast > MethodDecl


1 package polyglot.ast;
2
3 import polyglot.types.MethodInstance;
4 import polyglot.types.Flags;
5 import java.util.List JavaDoc;
6
7 /**
8  * A method declaration.
9  */

10 public interface MethodDecl extends ProcedureDecl
11 {
12     /** The method's flags. */
13     Flags flags();
14
15     /** Set the method's flags. */
16     MethodDecl flags(Flags flags);
17
18     /** The method's return type. */
19     TypeNode returnType();
20
21     /** Set the method's return type. */
22     MethodDecl returnType(TypeNode returnType);
23
24     /** The method's name. */
25     String JavaDoc name();
26
27     /** Set the method's name. */
28     MethodDecl name(String JavaDoc name);
29
30     /** The method's formal parameters.
31      * @return A list of {@link polyglot.ast.Formal Formal}.
32      */

33     List JavaDoc formals();
34
35     /** Set the method's formal parameters.
36      * @param formals A list of {@link polyglot.ast.Formal Formal}.
37      */

38     MethodDecl formals(List JavaDoc formals);
39
40     /** The method's exception throw types.
41      * @return A list of {@link polyglot.ast.TypeNode TypeNode}.
42      */

43     List JavaDoc throwTypes();
44
45     /** Set the method's exception throw types.
46      * @param throwTypes A list of {@link polyglot.ast.TypeNode TypeNode}.
47      */

48     MethodDecl throwTypes(List JavaDoc throwTypes);
49
50     /**
51      * The method type object. This field may not be valid until
52      * after signature disambiguation.
53      */

54     MethodInstance methodInstance();
55
56     /** Set the method's type object. */
57     MethodDecl methodInstance(MethodInstance mi);
58 }
59
Popular Tags