All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class openjava.ptree.DoWhileStatement

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

public class DoWhileStatement
extends NonLeaf
implements Statement, Ptree
The DoWhileStatement class represents a do-while statement node of parse tree.

See Also:
Ptree, NonLeaf, Statement, Expression

Constructor Index

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

Method Index

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

Constructors

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

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

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 body of this do-while statement.

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

Parameters:
stmts - the statement list of the body to set.
 o getExpression
 public Expression getExpression()
Gets the condtion of this do-while statement.

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

Parameters:
expr - the expression of the condtion to set.

All Packages  Class Hierarchy  This Package  Previous  Next  Index