KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ast > ConstructorCall


1 package polyglot.ast;
2
3 import polyglot.types.ConstructorInstance;
4 import polyglot.util.Enum;
5 import java.util.List JavaDoc;
6
7 /**
8  * A <code>ConstructorCall</code> represents a direct call to a constructor.
9  * For instance, <code>super(...)</code> or <code>this(...)</code>.
10  */

11 public interface ConstructorCall extends Stmt, ProcedureCall
12 {
13     /** Constructor call kind: either "super" or "this". */
14     public static class Kind extends Enum JavaDoc {
15         public Kind(String JavaDoc name) { super(name); }
16     }
17
18     public static final Kind SUPER = new Kind("super");
19     public static final Kind THIS = new Kind("this");
20
21     /** The qualifier of the call, possibly null. */
22     Expr qualifier();
23
24     /** Set the qualifier of the call, possibly null. */
25     ConstructorCall qualifier(Expr qualifier);
26
27     /** The kind of the call: THIS or SUPER. */
28     Kind kind();
29
30     /** Set the kind of the call: THIS or SUPER. */
31     ConstructorCall kind(Kind kind);
32
33     /**
34      * Actual arguments.
35      * @return A list of {@link polyglot.ast.Expr Expr}.
36      */

37     List JavaDoc arguments();
38
39     /**
40      * Set the actual arguments.
41      * @param arguments A list of {@link polyglot.ast.Expr Expr}.
42      */

43     ProcedureCall arguments(List JavaDoc arguments);
44
45     /**
46      * The constructor that is called. This field may not be valid until
47      * after type checking.
48      */

49     ConstructorInstance constructorInstance();
50
51     /** Set the constructor to call. */
52     ConstructorCall constructorInstance(ConstructorInstance ci);
53 }
54
Popular Tags