public interface IForLoopNode extends IStatementNode
for
, for
-in
,
or for
-each
-in
statement.
The shape of this node is
IForLoopNode IContainerNode <-- getConditionalsContainerNode() IBlockNode <-- getStatementContentsNode()In the case of a regular
for
statement,
the container node contains the three control expressions.
For example,
for (i = 0; i < n; i++) { ... }is represented as
IForLoopNode "for" IContainerNode IBinaryOperatorNode "=" IIdentifierNode "i" INumericalLiteralNode 0 IBinaryOperatorNode "<" IIdentifierNode "i" IIdentifierNode "n" IUnaryOperatorNode "++" IIdentifierNode "i" IBlockNode ...In the case of a
for
-in
,
or for
-each
-in
statement,
the container node contains a single binary operator node
for the in
operator.
For example,
for (p in o) { ... }is represented as
IForLoopNode "for" IContainerNode IBinaryOperatorNode "in" IIdentifierNode "p" IIdentifierNode "o" IBlockNode ...
Modifier and Type | Interface and Description |
---|---|
static class |
IForLoopNode.ForLoopKind
A ForLoopKind represents different kinds of for loops
|
UNKNOWN
Modifier and Type | Method and Description |
---|---|
IExpressionNode[] |
getConditionalExpressionNodes()
Returns an array containing the conditional expression(s)
for the
for statement. |
IContainerNode |
getConditionalsContainerNode()
Returns the container node containing the conditional expression(s)
for the
for statement. |
IForLoopNode.ForLoopKind |
getKind()
Returns the kind of the
for statement. |
getStatementContentsNode
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getNodeID, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
IForLoopNode.ForLoopKind getKind()
for
statement.IForLoopNode.ForLoopKind
IContainerNode getConditionalsContainerNode()
for
statement.IContainerNode
containing the conditional expressions,
or null
.IExpressionNode[] getConditionalExpressionNodes()
for
statement.IExpressionNode
objects, or null
.Copyright © 2016 The Apache Software Foundation. All rights reserved.