All Packages Class Hierarchy This Package Previous Next Index
Class openjava.ptree.Block
java.lang.Object
|
+----openjava.ptree.PtreeObject
|
+----openjava.ptree.NonLeaf
|
+----openjava.ptree.Block
- public class Block
- extends NonLeaf
- implements Statement
The Block class represents a node of parse tree
of block statement like :
{
int i = 0;
i = f( i );
}
- See Also:
- NonLeaf, Statement
-
Block()
- Allocates a new object with an empty statement list.
-
Block(StatementList)
- Allocates a new object.
-
getStatements()
- Gets the statement list of this block.
-
setStatements(StatementList)
- Sets the statement list of this block.
-
writeCode()
- Writes the code this parse-tree presents for.
Block
public Block(StatementList stmts)
- Allocates a new object.
- Parameters:
- stmts - statement list.
Block
public Block()
- Allocates a new object with an empty statement list.
writeCode
public void writeCode()
- Writes the code this parse-tree presents for.
- Overrides:
- writeCode in class NonLeaf
getStatements
public StatementList getStatements()
- Gets the statement list of this block.
- Returns:
- the statement list.
setStatements
public void setStatements(StatementList stmts)
- Sets the statement list of this block.
- Parameters:
- stmts - the statement list to set.
All Packages Class Hierarchy This Package Previous Next Index