public interface For extends ConditionalStatement
Statement
subinterface for the for
construct. It has an
declaration statement, a conditional statement, and an update statement (all
of which are optional).Modifier and Type | Method and Description |
---|---|
For |
addInit(Expression expr)
Adds this statement expression to the comma separated list of
initialization expressions.
|
For |
addUpdate(Expression update)
Adds this declaration statement to the list of updates.
|
List<Codeable> |
getInits()
Gets the comma separated list of initialzers from this for statement as
an List of
Expression OR a single Let object (depending
on how it was defined). |
List<Codeable> |
getUpdates()
Gets the comma separated list of updates from this for statement as an
List of
Expression . |
Let |
setInit(Type type)
Sets this declaration statement to a
Let statement with the given
Type . |
getPredicate, setPredicate
comment, getLabel, isAbruptCompletionStatement, setLabel
getStatements, insertStatement, insertStatement, newBreak, newContinue, newDeclarationLet, newDoWhile, newEmpty, newFor, newIf, newLet, newLocalBlock, newLocalClass, newLocalClass, newReturn, newStmt, newSwitch, newSynchronized, newThrow, newTry, newWhile, removeStmt
applyStyle, cast, getComment, isActive, isBlockWithAbruptCompletion, setComment, toCode, visit, vm
For addInit(Expression expr)
For addUpdate(Expression update)
List<Codeable> getInits()
Expression
OR a single Let
object (depending
on how it was defined). One need check the RTTI to be sure.List<Codeable> getUpdates()
Expression
.Let setInit(Type type)
Let
statement with the given
Type
. If any initialization expressions have previously been
added through the addInit(Expression)
method, they will all be
overwritten. This is because the Java Language Specification allows the
initialization section of the for statement to be a Let
expression.Copyright © 2000–2018 jenesis4java. All rights reserved.