net.sf.jelly.apt.strategies
Class TemplateOutputRedirectionStrategy<B extends TemplateBlock>
java.lang.Object
net.sf.jelly.apt.strategies.TemplateStrategyControl<B>
net.sf.jelly.apt.strategies.TemplateBlockStrategy<B>
net.sf.jelly.apt.strategies.TemplateOutputRedirectionStrategy<B>
- All Implemented Interfaces:
- TemplateStrategy<B>
- Direct Known Subclasses:
- FileStrategy, JavaSourceStrategy
public abstract class TemplateOutputRedirectionStrategy<B extends TemplateBlock>
- extends TemplateBlockStrategy<B>
A strategy for redirecting output.
- Author:
- Ryan Heaton
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemplateOutputRedirectionStrategy
public TemplateOutputRedirectionStrategy()
getWriter
protected abstract java.io.PrintWriter getWriter()
throws TemplateException,
java.io.IOException
- Returns:
- The writer to which to redirect the output.
- Throws:
TemplateException
java.io.IOException
preProcess
public boolean preProcess(B block,
TemplateOutput<B> output,
TemplateModel model)
throws java.io.IOException,
TemplateException
- Description copied from class:
TemplateBlockStrategy
- Pushes this strategy on the stack and redirects the output.
- Overrides:
preProcess
in class TemplateBlockStrategy<B extends TemplateBlock>
- Parameters:
block
- The block.output
- The output.model
- The model.
- Returns:
- true, as the body should be evaluated.
- Throws:
java.io.IOException
TemplateException
postProcess
public void postProcess(B block,
TemplateOutput<B> output,
TemplateModel model)
throws java.io.IOException,
TemplateException
- Description copied from class:
TemplateBlockStrategy
- Pops this strategy off the stack.
- Overrides:
postProcess
in class TemplateBlockStrategy<B extends TemplateBlock>
- Parameters:
block
- The block.output
- The output.model
- The model.
- Throws:
java.io.IOException
TemplateException