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
-
DoWhileStatement(StatementList, Expression)
- Allocates a new object.
-
getExpression()
- Gets the condtion of this do-while statement.
-
getStatements()
- Gets the body of this do-while statement.
-
setExpression(Expression)
- Sets the condtion of this do-while statement.
-
setStatements(StatementList)
- Sets the body of this do-while statement.
-
writeCode()
- Writes the code this parse-tree presents for.
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.
writeCode
public void writeCode()
- Writes the code this parse-tree presents for.
- Overrides:
- writeCode in class NonLeaf
getStatements
public StatementList getStatements()
- Gets the body of this do-while statement.
- Returns:
- the statement list of the body.
setStatements
public void setStatements(StatementList stmts)
- Sets the body of this do-while statement.
- Parameters:
- stmts - the statement list of the body to set.
getExpression
public Expression getExpression()
- Gets the condtion of this do-while statement.
- Returns:
- the expression of the condtion.
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