KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ast > Block


1 package polyglot.ast;
2
3 import java.util.List JavaDoc;
4
5 /**
6  * A <code>Block</code> represents a Java block statement -- an immutable
7  * sequence of statements.
8  */

9 public interface Block extends CompoundStmt
10 {
11     /**
12      * Get the statements in the block.
13      * @return A list of {@link polyglot.ast.Stmt Stmt}.
14      */

15     List JavaDoc statements();
16
17     /**
18      * Set the statements in the block.
19      * @param statements A list of {@link polyglot.ast.Stmt Stmt}.
20      */

21     Block statements(List JavaDoc statements);
22
23     /**
24      * Append a statement to the block, returning a new block.
25      */

26     Block append(Stmt stmt);
27
28     /**
29      * Prepend a statement to the block, returning a new block.
30      */

31     Block prepend(Stmt stmt);
32 }
33
Popular Tags