public class While extends LoopStatement
body, guard, inits, updates
Constructor and Description |
---|
While()
While.
|
While(Expression guard,
Statement body)
create a new While statement with no position info and no comments but guard and body set
|
While(Expression guard,
Statement body,
PositionInfo pos)
While.
|
While(Expression guard,
Statement body,
PositionInfo pos,
ExtList comments)
While.
|
Modifier and Type | Method and Description |
---|---|
SourceElement |
getLastElement()
Finds the source element that occurs last in the source.
|
boolean |
isCheckedBeforeIteration()
Is checked before iteration.
|
void |
prettyPrint(PrettyPrinter p)
Pretty printing the source element.
|
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to
perform some action/transformation on this element
|
equals, getBody, getChildAt, getChildCount, getExpressionAt, getExpressionCount, getGuard, getGuardExpression, getIForUpdates, getILoopInit, getInitializers, getStatementAt, getStatementCount, getUpdates
compatibleBlockSize, computeHashCode, equalsModRenaming, getArrayPos, match, matchChildren
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComments, match
equalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPosition
public While()
public While(Expression guard, Statement body, PositionInfo pos, ExtList comments)
guard
- an expression.body
- a statement.pos
- a PositionInformation.public While(Expression guard, Statement body)
guard
- an expression.body
- a statement.public While(Expression guard, Statement body, PositionInfo pos)
guard
- an expression.body
- a statement.pos
- a PositionInformation.public SourceElement getLastElement()
JavaSourceElement
getLastElement
in interface SourceElement
getLastElement
in class JavaSourceElement
JavaSourceElement.toSource()
,
JavaSourceElement.getEndPosition()
public boolean isCheckedBeforeIteration()
isCheckedBeforeIteration
in class LoopStatement
public void visit(Visitor v)
v
- the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElement
prettyPrint
in interface SourceElement
prettyPrint
in class JavaProgramElement
p
- a pretty printer.java.io.IOException
- occasionally thrown.