|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jelly.apt.strategies.TemplateStrategyControl<B> net.sf.jelly.apt.strategies.TemplateValueStrategy<B> net.sf.jelly.apt.strategies.AnnotationValueStrategy<B>
public class AnnotationValueStrategy<B extends TemplateBlock>
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.
Constructor Summary | |
---|---|
AnnotationValueStrategy()
|
Method Summary | |
---|---|
java.lang.String |
getAnnotation()
The specified annotation. |
protected com.sun.mirror.declaration.Declaration |
getCurrentDeclaration()
Gets the current declaration (in a loop). |
com.sun.mirror.declaration.Declaration |
getDeclaration()
The declaration on which to get the annotation value. |
java.lang.String |
getDefault()
The default value to output 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. |
java.lang.String |
getElement()
The type element. |
protected java.lang.String |
getValue()
Get the value to write to the template output. |
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 net.sf.jelly.apt.strategies.TemplateValueStrategy |
---|
postProcess, 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 |
---|
public AnnotationValueStrategy()
Method Detail |
---|
protected java.lang.String getValue() throws TemplateException
TemplateValueStrategy
getValue
in class TemplateValueStrategy<B extends TemplateBlock>
TemplateException
protected com.sun.mirror.declaration.Declaration getCurrentDeclaration()
public com.sun.mirror.declaration.Declaration getDeclaration()
public void setDeclaration(com.sun.mirror.declaration.Declaration declaration)
declaration
- The declaration on which to get the annotation value.public java.lang.String getDefault()
public void setDefault(java.lang.String defaultValue)
defaultValue
- The default value.public java.lang.String getAnnotation()
public void setAnnotation(java.lang.String annotation)
annotation
- The specified annotation.public java.lang.String getElement()
public void setElement(java.lang.String element)
element
- The type element. Default is "value".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |