|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectast.ASTNode
ast.Stmt
ast.WhileStmt
public class WhileStmt
The WhileStmt class represents a while (loop) statement appearing in a method declaration. It contains a predicate expression (predExpr) and body statement (bodyStmt).
ASTNode
,
Stmt
Field Summary | |
---|---|
protected Stmt |
bodyStmt
The body statement |
protected Expr |
predExpr
The predicate expression |
Fields inherited from class ast.ASTNode |
---|
charNum, lineNum, lineStr |
Constructor Summary | |
---|---|
WhileStmt(int lineNum,
Expr predExpr,
Stmt bodyStmt)
WhileStmt constructor |
Method Summary | |
---|---|
java.lang.Object |
accept(visitor.Visitor v,
java.lang.Object o)
Visitor method |
Stmt |
getBodyStmt()
Get the body statement |
Expr |
getPredExpr()
Get the predicate expression |
Methods inherited from class ast.ASTNode |
---|
getLineNum |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Expr predExpr
protected Stmt bodyStmt
Constructor Detail |
---|
public WhileStmt(int lineNum, Expr predExpr, Stmt bodyStmt)
lineNum
- source line number corresponding to this AST nodepredExpr
- the predicate expressionbodyStmt
- the then statementMethod Detail |
---|
public Expr getPredExpr()
public Stmt getBodyStmt()
public java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
accept
in class Stmt
v
- visitor objecto
- object to pass down
Visitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |