KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ast > Branch


1 package polyglot.ast;
2
3 import polyglot.util.Enum;
4
5 /**
6  * A <code>Branch</code> is an immutable representation of a branch
7  * statment in Java (a break or continue).
8  */

9 public interface Branch extends Stmt
10 {
11     /** Branch kind: either break or continue. */
12     public static class Kind extends Enum JavaDoc {
13         public Kind(String JavaDoc name) { super(name); }
14     }
15
16     public static final Kind BREAK = new Kind("break");
17     public static final Kind CONTINUE = new Kind("continue");
18
19     /**
20      * The kind of branch.
21      */

22     Kind kind();
23
24     /**
25      * Set the kind of branch.
26      */

27     Branch kind(Kind kind);
28
29     /**
30      * Target label of the branch.
31      */

32     String JavaDoc label();
33
34     /**
35      * Set the target label of the branch.
36      */

37     Branch label(String JavaDoc label);
38 }
39
Popular Tags