public abstract class LoopStatement extends JavaStatement implements StatementContainer, ExpressionContainer
| Modifier and Type | Field and Description |
|---|---|
protected Statement |
body
Body.
|
protected IGuard |
guard
Guard.
|
protected ILoopInit |
inits
Inits.
|
protected IForUpdates |
updates
Updates.
|
| Modifier and Type | Method and Description |
|---|---|
private static ExtList |
add(ExtList e,
java.lang.Object o) |
boolean |
equals(java.lang.Object o) |
Statement |
getBody()
Get body.
|
ProgramElement |
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
child array
|
int |
getChildCount()
Returns the number of children of this node.
|
Expression |
getExpressionAt(int index) |
int |
getExpressionCount()
Get the number of expressions in this container.
|
IGuard |
getGuard()
Get guard.
|
Expression |
getGuardExpression()
Get guard.
|
IForUpdates |
getIForUpdates()
Get updates as IForUpdates
|
ILoopInit |
getILoopInit()
get the loop initializer as ILoopInit
|
ImmutableArray<LoopInitializer> |
getInitializers()
Get initializers.
|
Statement |
getStatementAt(int index) |
int |
getStatementCount()
Get the number of statements in this container.
|
ImmutableArray<Expression> |
getUpdates()
Get updates.
|
abstract boolean |
isCheckedBeforeIteration()
Is checked before iteration.
|
compatibleBlockSize, computeHashCode, equalsModRenaming, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrint, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetComments, matchequalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getPositionInfo, getRelativePosition, getStartPosition, prettyPrint, visitprotected final ILoopInit inits
protected final IForUpdates updates
protected final IGuard guard
protected final Statement body
public LoopStatement()
public LoopStatement(Statement body)
body - a statement.public LoopStatement(Expression guard)
guard - the guard expression.public LoopStatement(Expression guard, Statement body, ExtList comments)
body - a statement.public LoopStatement(Expression guard, Statement body, ExtList comments, PositionInfo pos)
public LoopStatement(Expression guard, Statement body)
body - a statement.public LoopStatement(Expression guard, Statement body, PositionInfo pos)
public LoopStatement(LoopInitializer[] inits, Expression guard, Expression[] updates, Statement body)
inits - the initializers of the loopguard - the guard of the loopupdates - the updates of the loopbody - the body of the looppublic LoopStatement(ILoopInit inits, IGuard guard, IForUpdates updates, Statement body, ExtList comments)
inits - the initializers of the loopguard - the guard of the loopupdates - the updates of the loopbody - the body of the loopcomments - the comments attached to this statement.public LoopStatement(ILoopInit inits, IGuard guard, IForUpdates updates, Statement body, ExtList comments, PositionInfo pos)
public LoopStatement(ILoopInit inits, IGuard guard, IForUpdates updates, Statement body, PositionInfo pos)
inits - the initializers of the loopguard - the guard of the loopupdates - the updates of the loopbody - the body of the looppos - the position of the looppublic LoopStatement(ILoopInit inits, IGuard guard, IForUpdates updates, Statement body)
inits - the initializers of the loopguard - the guard of the loopupdates - the updates of the loopbody - the body of the looppublic int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
of boundspublic int getExpressionCount()
getExpressionCount in interface ExpressionContainerpublic Expression getExpressionAt(int index)
getExpressionAt in interface ExpressionContainerpublic IGuard getGuard()
public Expression getGuardExpression()
public Statement getBody()
public int getStatementCount()
getStatementCount in interface StatementContainerpublic Statement getStatementAt(int index)
getStatementAt in interface StatementContainerpublic ImmutableArray<LoopInitializer> getInitializers()
public ImmutableArray<Expression> getUpdates()
public IForUpdates getIForUpdates()
public ILoopInit getILoopInit()
public abstract boolean isCheckedBeforeIteration()
public boolean equals(java.lang.Object o)
equals in class JavaNonTerminalProgramElement