APIdia Launch Partner
Top Description Methods
com.sun.source.tree

public Interface ForLoopTree

extends StatementTree
Known Direct Implementers
com.sun.tools.javac.tree.JCTree.JCForLoop
Imports
java.util.List

A tree node for a basic for loop statement. For example:
  for ( initializer ; condition ; update )
      statement
Authors
Peter von der Ahé, Jonathan Gibbons
Since
1.6
Java Language Specification
14.14.1 The basic for Statement

Method Summary

Modifier and TypeMethod and Description
public ExpressionTree

Returns:

the condition
getCondition
()

Returns the condition of the for statement.

public List<? extends StatementTree>

Returns:

the initializers
getInitializer
()

Returns any initializers of the for statement.

public StatementTree

Returns:

the body
getStatement
()

Returns the body of the for statement.

public List<? extends ExpressionStatementTree>

Returns:

the update expressions
getUpdate
()

Returns any update expressions of the for statement.

Method Detail

getConditionback to summary
public ExpressionTree getCondition()

Returns the condition of the for statement. May be null if there is no condition.

Returns:ExpressionTree

the condition

getInitializerback to summary
public List<? extends StatementTree> getInitializer()

Returns any initializers of the for statement. The result will be an empty list if there are no initializers

Returns:List<? extends StatementTree>

the initializers

getStatementback to summary
public StatementTree getStatement()

Returns the body of the for statement.

Returns:StatementTree

the body

getUpdateback to summary
public List<? extends ExpressionStatementTree> getUpdate()

Returns any update expressions of the for statement.

Returns:List<? extends ExpressionStatementTree>

the update expressions