|
||||||||||
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<I,B>
public abstract class TemplateLoopStrategy<I,B extends TemplateBlock>
A template stategy that loops its block.
Constructor Summary | |
---|---|
TemplateLoopStrategy()
|
Method Summary | |
---|---|
protected abstract java.util.Iterator<I> |
getLoop(TemplateModel model)
Get the loop. |
boolean |
preProcess(B block,
TemplateOutput<B> output,
TemplateModel model)
Gets the loop, and sets up the model for the first iteration. |
boolean |
processBody(B block,
TemplateOutput<B> output,
TemplateModel model)
Set up the model for the loop and process the body. |
protected void |
setupModelForLoop(TemplateModel model,
I var,
int index)
Sets up the model for the current loop. |
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 TemplateLoopStrategy()
Method Detail |
---|
protected abstract java.util.Iterator<I> getLoop(TemplateModel model) throws TemplateException
model
- The model to use as necessary.model
-
TemplateException
protected void setupModelForLoop(TemplateModel model, I var, int index) throws TemplateException
model
- The model.var
- The loop variable.index
- The loop index.
TemplateException
public boolean preProcess(B block, TemplateOutput<B> output, TemplateModel model) throws java.io.IOException, TemplateException
preProcess
in class TemplateBlockStrategy<B extends TemplateBlock>
block
- The block.output
- The output.model
- The model.
java.io.IOException
TemplateException
public boolean processBody(B block, TemplateOutput<B> output, TemplateModel model) throws java.io.IOException, TemplateException
processBody
in class TemplateBlockStrategy<B extends TemplateBlock>
block
- The block.output
- The output.model
- The model.
java.io.IOException
TemplateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |