- All Superinterfaces:
StatementTree
,Tree
A tree node for a basic
for
loop statement.
For example:
for ( initializer ; condition ; update ) statement
- See Java Language Specification:
-
14.14.1 The basic for Statement
- Since:
- 1.6
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the condition of thefor
statement.List
<? extends StatementTree> Returns any initializers of thefor
statement.Returns the body of thefor
statement.List
<? extends ExpressionStatementTree> Returns any update expressions of thefor
statement.
-
Method Details
-
getInitializer
List<? extends StatementTree> getInitializer()Returns any initializers of thefor
statement. The result will be an empty list if there are no initializers- Returns:
- the initializers
-
getCondition
ExpressionTree getCondition()Returns the condition of thefor
statement. May benull
if there is no condition.- Returns:
- the condition
-
getUpdate
List<? extends ExpressionStatementTree> getUpdate()Returns any update expressions of thefor
statement.- Returns:
- the update expressions
-
getStatement
-