All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class openjava.ptree.WhileStatement

java.lang.Object
   |
   +----openjava.ptree.PtreeObject
           |
           +----openjava.ptree.NonLeaf
                   |
                   +----openjava.ptree.WhileStatement

public class WhileStatement
extends NonLeaf
implements Statement, Ptree
The WhileStatement class presents while statement node of parse tree

See Also:
Ptree, NonLeaf, Statement

Constructor Index

 o WhileStatement(Expression, StatementList)
Allocates a new object.

Method Index

 o getExpression()
Gets the condtion of this while statement.
 o getStatements()
Gets the body of this while statement.
 o setExpression(Expression)
Sets the condtion of this while statement.
 o setStatements(StatementList)
Sets the body of this while statement.
 o writeCode()
Writes the code this parse-tree presents for.

Constructors

 o WhileStatement
 public WhileStatement(Expression expr,
                       StatementList stmts)
Allocates a new object.

Parameters:
expr - the expression of the condition of this while statement.
stmts - the statement list of the body oof this while statement.

Methods

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

Overrides:
writeCode in class NonLeaf
 o getExpression
 public Expression getExpression()
Gets the condtion of this while statement.

Returns:
the expression of the condtion.
 o setExpression
 public void setExpression(Expression expr)
Sets the condtion of this while statement.

Parameters:
expr - the expression of the condtion to set.
 o getStatements
 public StatementList getStatements()
Gets the body of this while statement.

Returns:
the statement list of the body.
 o setStatements
 public void setStatements(StatementList stmts)
Sets the body of this while statement.

Parameters:
stmts - the statement list of the body to set.

All Packages  Class Hierarchy  This Package  Previous  Next  Index