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

Constructor Index

 o Block()
Allocates a new object with an empty statement list.
 o Block(StatementList)
Allocates a new object.

Method Index

 o getStatements()
Gets the statement list of this block.
 o setStatements(StatementList)
Sets the statement list of this block.
 o writeCode()
Writes the code this parse-tree presents for.

Constructors

 o Block
 public Block(StatementList stmts)
Allocates a new object.

Parameters:
stmts - statement list.
 o Block
 public Block()
Allocates a new object with an empty statement list.

Methods

 o writeCode
 public void writeCode()
Writes the code this parse-tree presents for.

Overrides:
writeCode in class NonLeaf
 o getStatements
 public StatementList getStatements()
Gets the statement list of this block.

Returns:
the statement list.
 o 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