|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jelly.apt.strategies.TemplateStrategyControl<B>
net.sf.jelly.apt.strategies.TemplateBlockStrategy<B>
net.sf.jelly.apt.strategies.TemplateLoopStrategy<D,B>
net.sf.jelly.apt.strategies.DeclarationLoopStrategy<D,B>
public abstract class DeclarationLoopStrategy<D extends com.sun.mirror.declaration.Declaration,B extends TemplateBlock>
Invokes the template body over a set of declarations.
| Constructor Summary | |
|---|---|
DeclarationLoopStrategy()
|
|
| Method Summary | |
|---|---|
D |
getCurrentDeclaration()
The current declaration in the loop. |
abstract java.util.Collection<D> |
getDeclarations()
The declarations to loop through. |
java.lang.String |
getIndexVar()
Variable in which to store the value of the index. |
protected java.util.Iterator<D> |
getLoop(TemplateModel model)
The loop variable is the collection of declarations over which to loop. |
java.lang.String |
getVar()
The context variable in which to store the declaration. |
void |
setIndexVar(java.lang.String indexVar)
Variable in which to store the value of the index. |
protected void |
setupModelForLoop(TemplateModel model,
D declaration,
int index)
Sets up the model for the current loop. |
void |
setVar(java.lang.String var)
The context variable in which to store the declaration. |
| Methods inherited from class net.sf.jelly.apt.strategies.TemplateLoopStrategy |
|---|
preProcess, processBody |
| Methods inherited from class net.sf.jelly.apt.strategies.TemplateBlockStrategy |
|---|
postProcess |
| Methods inherited from class net.sf.jelly.apt.strategies.TemplateStrategyControl |
|---|
invoke |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeclarationLoopStrategy()
| Method Detail |
|---|
protected java.util.Iterator<D> getLoop(TemplateModel model)
throws TemplateException
getLoop in class TemplateLoopStrategy<D extends com.sun.mirror.declaration.Declaration,B extends TemplateBlock>model -
TemplateException
protected void setupModelForLoop(TemplateModel model,
D declaration,
int index)
throws TemplateException
TemplateLoopStrategy
setupModelForLoop in class TemplateLoopStrategy<D extends com.sun.mirror.declaration.Declaration,B extends TemplateBlock>model - The model.declaration - The loop variable.index - The loop index.
TemplateExceptionpublic D getCurrentDeclaration()
public abstract java.util.Collection<D> getDeclarations()
throws MissingParameterException
MissingParameterExceptionpublic java.lang.String getVar()
public void setVar(java.lang.String var)
var - The context variable in which to store the declaration.public java.lang.String getIndexVar()
public void setIndexVar(java.lang.String indexVar)
indexVar - Variable in which to store the value of the index.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||