net.sf.jelly.apt.strategies
Class UnwrapIfPrimitiveStrategy<B extends TemplateBlock>

java.lang.Object
  extended by net.sf.jelly.apt.strategies.TemplateStrategyControl<B>
      extended by net.sf.jelly.apt.strategies.TemplateBlockStrategy<B>
          extended by net.sf.jelly.apt.strategies.UnwrapIfPrimitiveStrategy<B>
All Implemented Interfaces:
TemplateStrategy<B>

public class UnwrapIfPrimitiveStrategy<B extends TemplateBlock>
extends TemplateBlockStrategy<B>

Writes out code that unboxes its body in from wrapper object if the specified type is primitive.

Author:
Ryan Heaton

Constructor Summary
UnwrapIfPrimitiveStrategy()
           
 
Method Summary
 com.sun.mirror.type.TypeMirror getType()
          The type to check for primitiveness.
 void postProcess(B block, TemplateOutput<B> output, TemplateModel model)
          Pops this strategy off the stack.
 void setType(com.sun.mirror.type.TypeMirror type)
          The type to check for primitiveness.
 
Methods inherited from class net.sf.jelly.apt.strategies.TemplateBlockStrategy
preProcess, processBody
 
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

UnwrapIfPrimitiveStrategy

public UnwrapIfPrimitiveStrategy()
Method Detail

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

getType

public com.sun.mirror.type.TypeMirror getType()
The type to check for primitiveness.

Returns:
The type to check for primitiveness.

setType

public void setType(com.sun.mirror.type.TypeMirror type)
The type to check for primitiveness.

Parameters:
type - The type to check for primitiveness.