- 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 theforstatement.List<? extends StatementTree>Returns any initializers of theforstatement.Returns the body of theforstatement.List<? extends ExpressionStatementTree>Returns any update expressions of theforstatement.
-
Method Details
-
getInitializer
List<? extends StatementTree> getInitializer()Returns any initializers of theforstatement. The result will be an empty list if there are no initializers- Returns:
- the initializers
-
getCondition
ExpressionTree getCondition()Returns the condition of theforstatement. May benullif there is no condition.- Returns:
- the condition
-
getUpdate
List<? extends ExpressionStatementTree> getUpdate()Returns any update expressions of theforstatement.- Returns:
- the update expressions
-
getStatement
StatementTree getStatement()Returns the body of theforstatement.- Returns:
- the body
-