|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jelly.apt.strategies.TemplateStrategyControl<B>
net.sf.jelly.apt.strategies.TemplateBlockStrategy<B>
net.sf.jelly.apt.strategies.IfHasAnnotationStrategy<B>
public class IfHasAnnotationStrategy<B extends TemplateBlock>
Evalute the body of the tag if the specified declaration has a given annotation.
Constructor Summary | |
---|---|
IfHasAnnotationStrategy()
|
Method Summary | |
---|---|
java.lang.String |
getAnnotation()
The annotation to check for. |
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 evaluate whether exists the annotation. |
java.lang.String |
getVar()
The name of the variable to which to assign the annotation. |
boolean |
preProcess(B block,
TemplateOutput<B> output,
TemplateModel model)
Pushes this strategy on the stack and redirects the output. |
void |
setAnnotation(java.lang.String annotation)
The annotation to check for. |
void |
setDeclaration(com.sun.mirror.declaration.Declaration declaration)
The declaration on which to evaluate whether exists the annotation. |
void |
setVar(java.lang.String var)
The name of the variable to which to assign the annotation. |
Methods inherited from class net.sf.jelly.apt.strategies.TemplateBlockStrategy |
---|
postProcess, 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 IfHasAnnotationStrategy()
Method Detail |
---|
public boolean preProcess(B block, TemplateOutput<B> output, TemplateModel model) throws java.io.IOException, TemplateException
TemplateBlockStrategy
preProcess
in class TemplateBlockStrategy<B extends TemplateBlock>
block
- The block.output
- The output.model
- The model.
java.io.IOException
TemplateException
public java.lang.String getAnnotation()
public void setAnnotation(java.lang.String annotation)
annotation
- The annotation to check for.public java.lang.String getVar()
public void setVar(java.lang.String var)
var
- The name of the variable to which to assign the annotation.public com.sun.mirror.declaration.Declaration getDeclaration()
public void setDeclaration(com.sun.mirror.declaration.Declaration declaration)
declaration
- The declaration on which to evaluate whether exists the annotation.protected com.sun.mirror.declaration.Declaration getCurrentDeclaration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |