KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > types > VarInstance


1 package polyglot.types;
2
3 /**
4  * A <code>VarInstance</code> contains type information for a variable. It may
5  * be either a local or a field.
6  */

7 public interface VarInstance extends TypeObject
8 {
9     /**
10      * The flags of the variable.
11      */

12     Flags flags();
13
14     /**
15      * The name of the variable.
16      */

17     String JavaDoc name();
18
19     /**
20      * The type of the variable.
21      */

22     Type type();
23
24     /**
25      * The variable's constant value, or null.
26      */

27     Object JavaDoc constantValue();
28
29     /**
30      * Whether the variable has a constant value.
31      */

32     boolean isConstant();
33
34     /**
35      * Destructively set the type of the variable.
36      * This method should be deprecated.
37      */

38     void setType(Type type); //destructive update
39

40     /**
41      * Destructively set the flags of the variable.
42      */

43     void setFlags(Flags flags);
44 }
45
Popular Tags