class ForJBlock extends BasicJBlock implements JFor
JBlock.Braces
Modifier and Type | Field and Description |
---|---|
private FirstJVarDeclaration |
init |
private JExpr |
test |
private JExpr |
update |
Constructor and Description |
---|
ForJBlock(BasicJBlock parent) |
Modifier and Type | Method and Description |
---|---|
JVarDeclaration |
init(int mods,
java.lang.Class<?> type,
java.lang.String name,
JExpr value)
Add a loop initializer.
|
JVarDeclaration |
init(int mods,
JType type,
java.lang.String name,
JExpr value)
Add a loop initializer.
|
JVarDeclaration |
init(int mods,
java.lang.String type,
java.lang.String name,
JExpr value)
Add a loop initializer.
|
JFor |
test(JExpr expr)
Add a test expression.
|
JFor |
update(JExpr updateExpr)
Add an update expression.
|
void |
write(SourceFileWriter writer) |
_assert, _assert, _break, _break, _class, _continue, _continue, _do, _for, _if, _new, _new, _new, _newAnon, _newAnon, _newAnon, _return, _return, _switch, _synchronized, _throw, _try, _while, add, addAssign, andAssign, anonLabel, anonLabel, assign, blankLine, block, call, call, call, call, callStatic, callStatic, callStatic, callStatic, callSuper, callThis, divAssign, empty, forEach, forEach, forEach, forwardLabel, get, getParent, hasSingleItemOfType, label, label, lshrAssign, modAssign, mulAssign, orAssign, postDec, postInc, preDec, preInc, shlAssign, shrAssign, size, subAssign, tempName, tempVar, tempVar, tempVar, var, var, var, var, var, var, write, write, xorAssign
blockComment, lineComment, writeComments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_assert, _assert, _break, _break, _class, _continue, _continue, _do, _for, _if, _new, _new, _new, _newAnon, _newAnon, _newAnon, _return, _return, _switch, _synchronized, _throw, _try, _while, add, addAssign, andAssign, anonLabel, anonLabel, assign, blankLine, block, call, call, call, call, callStatic, callStatic, callStatic, callStatic, callSuper, callThis, divAssign, empty, forEach, forEach, forEach, forwardLabel, label, label, lshrAssign, modAssign, mulAssign, orAssign, postDec, postInc, preDec, preInc, shlAssign, shrAssign, subAssign, tempName, tempVar, tempVar, tempVar, var, var, var, var, var, var, xorAssign
blockComment, lineComment
private FirstJVarDeclaration init
private JExpr test
private JExpr update
ForJBlock(BasicJBlock parent)
public JVarDeclaration init(int mods, java.lang.String type, java.lang.String name, JExpr value)
JFor
init
in interface JFor
mods
- the modifiers for the initializer variable declarationtype
- the type of the initializer variablesname
- the name of the first initializer variablevalue
- the initial value for the first initializer variablepublic JVarDeclaration init(int mods, JType type, java.lang.String name, JExpr value)
JFor
init
in interface JFor
mods
- the modifiers for the initializer variable declarationtype
- the type of the initializer variablesname
- the name of the first initializer variablevalue
- the initial value for the first initializer variablepublic JVarDeclaration init(int mods, java.lang.Class<?> type, java.lang.String name, JExpr value)
JFor
init
in interface JFor
mods
- the modifiers for the initializer variable declarationtype
- the type of the initializer variablesname
- the name of the first initializer variablevalue
- the initial value for the first initializer variablepublic JFor update(JExpr updateExpr)
JFor
public void write(SourceFileWriter writer) throws java.io.IOException
write
in interface Writable
write
in class BasicJBlock
java.io.IOException