Package org.jboss.jdeparser
Class ForJBlock
- java.lang.Object
-
- org.jboss.jdeparser.BasicJCommentable
-
- org.jboss.jdeparser.BasicJBlock
-
- org.jboss.jdeparser.ForJBlock
-
- All Implemented Interfaces:
BlockContent
,JBlock
,JCommentable
,JFor
,JStatement
,Writable
class ForJBlock extends BasicJBlock implements JFor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.jdeparser.JBlock
JBlock.Braces
-
-
Constructor Summary
Constructors Constructor Description ForJBlock(BasicJBlock parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JVarDeclaration
init(int mods, java.lang.Class<?> 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.JVarDeclaration
init(int mods, JType 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)
-
Methods inherited from class org.jboss.jdeparser.BasicJBlock
_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
-
Methods inherited from class org.jboss.jdeparser.BasicJCommentable
blockComment, lineComment, writeComments
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.jdeparser.JBlock
_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
-
Methods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineComment
-
-
-
-
Field Detail
-
init
private FirstJVarDeclaration init
-
test
private JExpr test
-
update
private JExpr update
-
-
Constructor Detail
-
ForJBlock
ForJBlock(BasicJBlock parent)
-
-
Method Detail
-
init
public JVarDeclaration init(int mods, java.lang.String type, java.lang.String name, JExpr value)
Description copied from interface:JFor
Add a loop initializer.- Specified by:
init
in interfaceJFor
- Parameters:
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 variable- Returns:
- the initializer variable declaration
-
init
public JVarDeclaration init(int mods, JType type, java.lang.String name, JExpr value)
Description copied from interface:JFor
Add a loop initializer.- Specified by:
init
in interfaceJFor
- Parameters:
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 variable- Returns:
- the initializer variable declaration
-
init
public JVarDeclaration init(int mods, java.lang.Class<?> type, java.lang.String name, JExpr value)
Description copied from interface:JFor
Add a loop initializer.- Specified by:
init
in interfaceJFor
- Parameters:
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 variable- Returns:
- the initializer variable declaration
-
update
public JFor update(JExpr updateExpr)
Description copied from interface:JFor
Add an update expression.
-
write
public void write(SourceFileWriter writer) throws java.io.IOException
- Specified by:
write
in interfaceWritable
- Overrides:
write
in classBasicJBlock
- Throws:
java.io.IOException
-
-