Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.javatools.parser.java.v2.model.statement
Interface SourceForStatement

All Superinterfaces:
Element, SourceBlockElement, SourceCompoundStatement, SourceElement, SourceStatement

public interface SourceForStatement
extends SourceCompoundStatement

A for statement. JLS3 14.14.


Field Summary
 
Fields inherited from interface oracle.javatools.parser.java.v2.model.statement.SourceStatement
EMPTY_ARRAY
 
Fields inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT
 
Method Summary
 SourceExpression getForCollection()
          In an enhanced for loop, this is the collection expression.
 SourceExpression getForConditional()
          In a standard for loop, this is the condition expression.
 SourceListExpression getForInitializationList()
          In a standard for loop with no variable declarations, this is the list wrapping the initialization terms.
 java.util.List<SourceExpression> getForInitializations()
          In a standard for loop with no variable declarations, these are the initialization terms.
 byte getForType()
          FOR_EXPRESSION: A standard for loop with no variable declarations.
 SourceListExpression getForUpdateList()
          In a standard for loop, this is the list wrapping the update terms.
 java.util.List<SourceExpression> getForUpdates()
          In a standard for loop, these are the update terms.
 SourceLocalVariableDeclaration getForVariableDeclaration()
          In a standard for loop with variable declarations, this is the initialization declaration wrapping the variables.
 java.util.List<SourceLocalVariable> getForVariables()
          In a standard for loop with variable declarations, these are the variables declared in the initialization declaration.
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.statement.SourceCompoundStatement
getControlExpression, getEndClause, getPrimaryClause
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.statement.SourceStatement
getStatementLabels, getStatementToken
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
addSelf, addSelf, addSelfAfter, addSelfBefore, adjustTextIndentation, clearBinding, cloneSelf, compile, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getEndOffset, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, hasErrors, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf
 

Method Detail

getForType

byte getForType()
FOR_EXPRESSION: A standard for loop with no variable declarations. FOR_VARIABLE_D: A standard for loop with variable declarations. FOR_ENHANCED: An enhanced for loop.


getForVariableDeclaration

SourceLocalVariableDeclaration getForVariableDeclaration()
In a standard for loop with variable declarations, this is the initialization declaration wrapping the variables. Unless you need the actual SourceLocalVariableDeclaration, you should probably use getForVariables().

Returns:
The local variable declaration. Null if none.

getForVariables

java.util.List<SourceLocalVariable> getForVariables()
In a standard for loop with variable declarations, these are the variables declared in the initialization declaration. If there is a variable declaration, then this is equivalent to calling getForVariableDeclaration().getVariables().

Returns:
The array of variable declarations. Returns a collection of SourceLocalVariable's.

getForInitializationList

SourceListExpression getForInitializationList()
In a standard for loop with no variable declarations, this is the list wrapping the initialization terms. Unless you need the actual ListExpression, you should probably use getForInitializations().

Returns:
The ListExpression wrapping the initializations. Null if none.

getForInitializations

java.util.List<SourceExpression> getForInitializations()
In a standard for loop with no variable declarations, these are the initialization terms. If there are initialization terms, this is equivalent to calling getForInitializationList().getOperands().

Returns:
The array of initialization terms. Returns a collection of SourceExpression's.

getForConditional

SourceExpression getForConditional()
In a standard for loop, this is the condition expression. Syntax is "for( initialization; conditional; update) stmt".

Returns:
The conditional term. Null if there is none.

getForUpdateList

SourceListExpression getForUpdateList()
In a standard for loop, this is the list wrapping the update terms. Syntax is "for( initialization; conditional; update) stmt". Unless you need the actual ListExpression, you should probably use getForUpdates().

Returns:
The ListExpression wrapping the updates. Null if none.

getForUpdates

java.util.List<SourceExpression> getForUpdates()
In a standard for loop, these are the update terms. Syntax is "for( initialization; conditional; update) stmt". If there are update terms, this is equivalent to calling getForUpdateList().getOperands().

Returns:
The array of update terms. Returns a collection of SourceExpression's.

getForCollection

SourceExpression getForCollection()
In an enhanced for loop, this is the collection expression. Syntax is "for ( type name: collection ) stmt".

Returns:
The expression for the collection term.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.