net.sf.jelly.apt.tags
Class AnnotationValueTag
java.lang.Object
org.apache.commons.jelly.TagSupport
net.sf.jelly.apt.APTJellyTag<AnnotationValueStrategy>
net.sf.jelly.apt.tags.AnnotationValueTag
- All Implemented Interfaces:
- TemplateBlock, org.apache.commons.jelly.Tag
public class AnnotationValueTag
- extends APTJellyTag<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
| Fields inherited from class org.apache.commons.jelly.TagSupport |
body, context, hasTrimmed, parent, shouldTrim |
|
Method Summary |
void |
setAnnotation(java.lang.String annotation)
The specified annotation. |
void |
setDeclaration(com.sun.mirror.declaration.Declaration declaration)
The declaration on which to get the annotation value. |
void |
setDefault(java.lang.String defaultValue)
The default to return under any of the following circumstances:
the annotation wasn't found
the specified type element wasn't found
the value of the specified type element was its default value.
|
void |
setElement(java.lang.String element)
The type element. |
| Methods inherited from class org.apache.commons.jelly.TagSupport |
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationValueTag
public AnnotationValueTag()
setDeclaration
public void setDeclaration(com.sun.mirror.declaration.Declaration declaration)
- The declaration on which to get the annotation value.
- Parameters:
declaration - The declaration on which to get the annotation value.
setDefault
public void setDefault(java.lang.String defaultValue)
- The default to return under any of the following circumstances:
- the annotation wasn't found
- the specified type element wasn't found
- the value of the specified type element was its default value.
- Parameters:
defaultValue - The default value.
setAnnotation
public void setAnnotation(java.lang.String annotation)
- The specified annotation.
- Parameters:
annotation - The specified annotation.
setElement
public void setElement(java.lang.String element)
- The type element. Default is "value".
- Parameters:
element - The type element. Default is "value".