KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ast > Field


1 package polyglot.ast;
2
3 import polyglot.types.FieldInstance;
4
5 /**
6  * A <code>Field</code> is an immutable representation of a Java field
7  * access. It consists of field name and may also have either a
8  * <code>Type</code> or an <code>Expr</code> containing the field being
9  * accessed.
10  */

11 public interface Field extends Variable
12 {
13     /**
14      * Get the type object for the field. This field may not be valid until
15      * after type checking.
16      */

17     FieldInstance fieldInstance();
18
19     /** Set the type object for the field. */
20     Field fieldInstance(FieldInstance fi);
21
22     /**
23      * Get the field's container object or type. May be null before
24      * disambiguation.
25      */

26     Receiver target();
27
28     /** Set the field's container object or type. */
29     Field target(Receiver target);
30
31     /**
32      * Returns whether the target of this field is implicit, that is if the
33      * target is either "this" or a classname, and the source code did not
34      * explicitly provide a target.
35      */

36     boolean isTargetImplicit();
37     
38     /**
39      * Set whether the target of the field is implicit.
40      */

41     Field targetImplicit(boolean implicit);
42     
43     /** Get the field's name. */
44     String JavaDoc name();
45     /** Set the field's name. */
46     Field name(String JavaDoc name);
47 }
48
Popular Tags