KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ext > jl > ast > Block_c


1 package polyglot.ext.jl.ast;
2
3 import polyglot.ast.*;
4 import polyglot.util.*;
5 import polyglot.types.*;
6 import polyglot.visit.*;
7 import java.util.*;
8
9 /**
10  * A <code>Block</code> represents a Java block statement -- an immutable
11  * sequence of statements.
12  */

13 public class Block_c extends AbstractBlock_c implements Block
14 {
15     public Block_c(Position pos, List statements) {
16     super(pos, statements);
17     }
18
19     /** Write the block to an output file. */
20     public void prettyPrint(CodeWriter w, PrettyPrinter tr) {
21     w.write("{");
22     w.allowBreak(4," ");
23     super.prettyPrint(w, tr);
24     w.allowBreak(0, " ");
25     w.write("}");
26     }
27 }
28
Popular Tags