oracle.jdeveloper.jot
Interface JotFor
- All Superinterfaces:
- JotBlockElement, JotConditional, JotElement, JotHasChildStatement, JotStatement
- public interface JotFor
- extends JotConditional
A JotFor
represents a for statement. A for statement
contains three expressions, any or all of which can be null, and a
child statement.
- Since:
- 5.0
- See Also:
- "Section 14.13 of the Java Language Specification"
Fields inherited from interface oracle.jdeveloper.jot.JotStatement |
BLOCK_STATEMENT, BREAK_STATEMENT, CASE_CLAUSE, CONTINUE_STATEMENT, DO_STATEMENT, ELSE_CLAUSE, EMPTY_STATEMENT, EXPRESSION_STATEMENT, FOR_STATEMENT, IF_STATEMENT, RETURN_STATEMENT, SWITCH_STATEMENT, SYNCHRONIZED_STATEMENT, THROW_STATEMENT, TRY_STATEMENT, WHILE_STATEMENT |
Methods inherited from interface oracle.jdeveloper.jot.JotHasChildStatement |
addBlock, addBreak, addContinue, addDo, addExpressionStatement, addExpressionStatement, addFor, addIf, addReturn, addStatement, addSwitch, addSynchronized, addThrow, addTry, addWhile, createAssignment, createMethodCall, createNestedMethodCall, getChildStatement |
Methods inherited from interface oracle.jdeveloper.jot.JotStatement |
addLabel, getAsBlock, getAsBreak, getAsCase, getAsContinue, getAsDo, getAsExpressionStatement, getAsFor, getAsIf, getAsReturn, getAsSwitch, getAsSynchronized, getAsThrow, getAsTry, getAsWhile, getLabels, getStatementText, getStatementType, removeLabel |
getForInitialization
public java.lang.String getForInitialization()
- Retrieves the intialization code of the
for
statement.
- Returns:
- a
String
encapsulating the initialization
code.
getForInitializer
public JotForInitializer getForInitializer()
- Retrieves the JotForInitializer that represents the initialization
clause of this for statement
setForInitialization
public void setForInitialization(java.lang.String newInit)
- Sets the intialization code the
for
statement.
- Parameters:
newInit
- the new initialization code
getConditionalExpression
public JotExpression getConditionalExpression()
- Retrieves the conditional expression of the
for
statement.
This expression will be null
if the for statement does not
include a condition.
- Specified by:
getConditionalExpression
in interface JotConditional
- Following copied from interface:
oracle.jdeveloper.jot.JotConditional
- Returns:
- the conditional expression
setConditionalExpression
public void setConditionalExpression(java.lang.String exp)
- Sets the conditional expression of this
for
statement.
Setting the expression to null
will remove the expression,
- Specified by:
setConditionalExpression
in interface JotConditional
- Parameters:
exp
- the new conditional expression.
getForUpdate
public JotStatementExpression[] getForUpdate()
- Retrieves the expression comprising the update clause of this statement.
If the update clause is blank, a zero-length array is returned.
- Returns:
- an array of
JotStatementExpressions
objects
representing the update clause expressions.
addForUpdateExpression
public JotStatementExpression addForUpdateExpression(JotStatementExpression marker,
boolean before,
java.lang.String exp)
- Adds a new expression to the update clause of this for statement.
- Parameters:
marker
- an existing expression to position relative to, or
null
if the expression should be positioned at the beginning or
end of the update clause.before
- whether to position the new expression before or after the
existing marker expression; or if marker
is null
,
whether to position the new expression at the beginning or the end of
the update clauseexp
- the new expression to add.- Returns:
- the newly created expression
removeForUpdateExpression
public void removeForUpdateExpression(JotStatementExpression exp)
- Removes an existing expression from the update clause.
- Parameters:
exp
- the expression to remove