net.sf.jelly.apt.freemarker.transforms
Class AnnotationValueTransform

java.lang.Object
  extended by net.sf.jelly.apt.freemarker.FreemarkerTransform<AnnotationValueStrategy>
      extended by net.sf.jelly.apt.freemarker.transforms.AnnotationValueTransform
All Implemented Interfaces:
freemarker.template.TemplateModel, freemarker.template.TemplateTransformModel

public class AnnotationValueTransform
extends FreemarkerTransform<AnnotationValueStrategy>

Outputs an annotation value. If a declaration is specified, it will be used to lookup the annotation value. Otherwise, this tag must be nested within a declaration loop tag and the current declaration will be used. If a default value is specified, it will be output if either (1) the specified annotation doesn't exist, (2) the specified annotation element doesn't exist, or (3) the value of the specified annotation element is its default value. If no default value is specified, the declared default value of the element will be output (if there is one). Otherwise, nothing will be output.

Author:
Ryan Heaton

Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
AnnotationValueTransform(java.lang.String namespace)
          Construct a new transform under the specified namespace.
 
Method Summary
 AnnotationValueStrategy newStrategy()
          Instantiate a new strategy instance.
 
Methods inherited from class net.sf.jelly.apt.freemarker.FreemarkerTransform
convertString, findSetter, getTransformName, getTransformNamespace, getWriter, setupStrategy, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationValueTransform

public AnnotationValueTransform(java.lang.String namespace)
Construct a new transform under the specified namespace. null or "" means the root namespace.

Parameters:
namespace - The namespace.
Method Detail

newStrategy

public AnnotationValueStrategy newStrategy()
Description copied from class: FreemarkerTransform
Instantiate a new strategy instance.

Specified by:
newStrategy in class FreemarkerTransform<AnnotationValueStrategy>
Returns:
The strategy.