KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ast > Assign


1 package polyglot.ast;
2
3 import polyglot.util.Enum;
4
5 /**
6  * An <code>Assign</code> represents a Java assignment expression.
7  */

8 public interface Assign extends Expr
9 {
10     /** Assignment operator. */
11     public static class Operator extends Enum JavaDoc {
12     public Operator(String JavaDoc name) { super(name); }
13     }
14
15     public static final Operator ASSIGN = new Operator("=");
16     public static final Operator ADD_ASSIGN = new Operator("+=");
17     public static final Operator SUB_ASSIGN = new Operator("-=");
18     public static final Operator MUL_ASSIGN = new Operator("*=");
19     public static final Operator DIV_ASSIGN = new Operator("/=");
20     public static final Operator MOD_ASSIGN = new Operator("%=");
21     public static final Operator BIT_AND_ASSIGN = new Operator("&=");
22     public static final Operator BIT_OR_ASSIGN = new Operator("|=");
23     public static final Operator BIT_XOR_ASSIGN = new Operator("^=");
24     public static final Operator SHL_ASSIGN = new Operator("<<=");
25     public static final Operator SHR_ASSIGN = new Operator(">>=");
26     public static final Operator USHR_ASSIGN = new Operator(">>>=");
27
28     /**
29      * Left child (target) of the assignment.
30      * The target must be a Variable, but this is not enforced
31      * statically to keep Polyglot backward compatible.
32      */

33     Expr left();
34
35     /**
36      * Set the left child (target) of the assignment.
37      * The target must be a Variable, but this is not enforced
38      * statically to keep Polyglot backward compatible.
39      */

40     Assign left(Expr left);
41
42     /**
43      * The assignment's operator.
44      */

45     Operator operator();
46
47     /**
48      * Set the assignment's operator.
49      */

50     Assign operator(Operator op);
51
52     /**
53      * Right child (source) of the assignment.
54      */

55     Expr right();
56
57     /**
58      * Set the right child (source) of the assignment.
59      */

60     Assign right(Expr right);
61     
62     boolean throwsArithmeticException();
63 }
64
Popular Tags