polyglot.ast
Interface Block

All Superinterfaces:
java.lang.Cloneable, CompoundStmt, Copy, JL, Node, NodeOps, Stmt, Term
All Known Subinterfaces:
SwitchBlock
All Known Implementing Classes:
AbstractBlock_c, Block_c, SwitchBlock_c

public interface Block
extends CompoundStmt

A Block represents a Java block statement -- an immutable sequence of statements.


Method Summary
 Block append(Stmt stmt)
          Append a statement to the block, returning a new block.
 Block prepend(Stmt stmt)
          Prepend a statement to the block, returning a new block.
 java.util.List statements()
          Get the statements in the block.
 Block statements(java.util.List statements)
          Set the statements in the block.
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, exceptions, exceptions, reachable, reachable
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

statements

java.util.List statements()
Get the statements in the block.

Returns:
A list of Stmt.

statements

Block statements(java.util.List statements)
Set the statements in the block.

Parameters:
statements - A list of Stmt.

append

Block append(Stmt stmt)
Append a statement to the block, returning a new block.


prepend

Block prepend(Stmt stmt)
Prepend a statement to the block, returning a new block.