KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ast > Case


1 package polyglot.ast;
2
3 /**
4  * A <code>Case</code> is a representation of a Java <code>case</code>
5  * statement. It can only be contained in a <code>Switch</code>.
6  */

7 public interface Case extends SwitchElement
8 {
9     /**
10      * Get the case label. This must should a constant expression.
11      * The case label is null for the <code>default</code> case.
12      */

13     Expr expr();
14
15     /**
16      * Set the case label. This must should a constant expression,
17      * or null.
18      */

19     Case expr(Expr expr);
20
21     /** Returns true iff this is the default case. */
22     boolean isDefault();
23
24     /**
25      * Returns the value of the case label. This value is only valid
26      * after type-checking.
27      */

28     long value();
29
30     /**
31      * Set the value of the case label.
32      */

33     Case value(long value);
34 }
35
Popular Tags