KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ast > Call


1 package polyglot.ast;
2
3 import polyglot.types.MethodInstance;
4 import java.util.List JavaDoc;
5
6 /**
7  * A <code>Call</code> is an immutable representation of a Java
8  * method call. It consists of a method name and a list of arguments.
9  * It may also have either a Type upon which the method is being
10  * called or an expression upon which the method is being called.
11  */

12 public interface Call extends Expr, ProcedureCall
13 {
14     /**
15      * The call's target object.
16      */

17     Receiver target();
18
19     /**
20      * Set the call's target.
21      */

22     Call target(Receiver target);
23
24     /**
25      * The name of the method to call.
26      */

27     String JavaDoc name();
28
29     /**
30      * Set the name of the method to call.
31      */

32     Call name(String JavaDoc name);
33
34     /**
35      * Indicates if the target of this call is implicit, that
36      * is, was not specified explicitly in the syntax.
37      * @return boolean indicating if the target of this call is implicit
38      */

39     boolean isTargetImplicit();
40     
41     /**
42      * Set whether the target of this call is implicit.
43      */

44     Call targetImplicit(boolean targetImplicit);
45     
46     /**
47      * The call's actual arguments.
48      * @return A list of {@link polyglot.ast.Expr Expr}.
49      */

50     List JavaDoc arguments();
51
52     /**
53      * Set the call's actual arguments.
54      * @param arguments A list of {@link polyglot.ast.Expr Expr}.
55      */

56     ProcedureCall arguments(List JavaDoc arguments);
57
58     /**
59      * The type object of the method we are calling. This is, generally, only
60      * valid after the type-checking pass.
61      */

62     MethodInstance methodInstance();
63
64     /**
65      * Set the type object of the method we are calling.
66      */

67     Call methodInstance(MethodInstance mi);
68 }
69
Popular Tags