net.sf.jelly.apt.strategies
Class MethodDeclarationLoopStrategy<B extends TemplateBlock>
java.lang.Object
net.sf.jelly.apt.strategies.TemplateStrategyControl<B>
net.sf.jelly.apt.strategies.TemplateBlockStrategy<B>
net.sf.jelly.apt.strategies.TemplateLoopStrategy<D,B>
net.sf.jelly.apt.strategies.DeclarationLoopStrategy<D,B>
net.sf.jelly.apt.strategies.AnnotationFilterableDeclarationLoopStrategy<M,B>
net.sf.jelly.apt.strategies.MemberDeclarationLoopStrategy<E,B>
net.sf.jelly.apt.strategies.ExecutableDeclarationLoopStrategy<com.sun.mirror.declaration.MethodDeclaration,B>
net.sf.jelly.apt.strategies.MethodDeclarationLoopStrategy<B>
- All Implemented Interfaces:
- TemplateStrategy<B>
public class MethodDeclarationLoopStrategy<B extends TemplateBlock>
- extends ExecutableDeclarationLoopStrategy<com.sun.mirror.declaration.MethodDeclaration,B>
Evaluates its body for all methods of a type declaration.
- Author:
- Ryan Heaton
Method Summary |
protected java.util.Collection<com.sun.mirror.declaration.MethodDeclaration> |
getMemberDeclarations(com.sun.mirror.declaration.TypeDeclaration declaration)
The method declarations of the given type declaration. |
java.lang.String |
getReturnTypeVar()
The variable to which to assign the return type (as a TypeMirror ). |
void |
setReturnTypeVar(java.lang.String returnTypeVar)
The variable to which to assign the return type (as a TypeMirror ). |
protected void |
setupModelForLoop(TemplateModel model,
com.sun.mirror.declaration.MethodDeclaration declaration,
int index)
Sets up the model for the current loop. |
Methods inherited from class net.sf.jelly.apt.strategies.MemberDeclarationLoopStrategy |
getAllDeclarationsToConsiderForAnnotationFiltering, getAnnotationProcessorEnvironment, getCurrentTypeDeclaration, getDeclaration, getSuperclassesMemberDeclarations, getSuperinterfacesMemberDeclarations, hidden, isIncludeSuperclasses, isIncludeSuperinterfaces, setDeclaration, setIncludeSuperclasses, setIncludeSuperinterfaces |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodDeclarationLoopStrategy
public MethodDeclarationLoopStrategy()
getMemberDeclarations
protected java.util.Collection<com.sun.mirror.declaration.MethodDeclaration> getMemberDeclarations(com.sun.mirror.declaration.TypeDeclaration declaration)
- The method declarations of the given type declaration.
- Specified by:
getMemberDeclarations
in class MemberDeclarationLoopStrategy<com.sun.mirror.declaration.MethodDeclaration,B extends TemplateBlock>
- Parameters:
declaration
- The declaration.
- Returns:
- The method declarations of the given type declaration.
setupModelForLoop
protected void setupModelForLoop(TemplateModel model,
com.sun.mirror.declaration.MethodDeclaration declaration,
int index)
throws TemplateException
- Description copied from class:
TemplateLoopStrategy
- Sets up the model for the current loop. Default implementation does nothing.
- Overrides:
setupModelForLoop
in class AnnotationFilterableDeclarationLoopStrategy<com.sun.mirror.declaration.MethodDeclaration,B extends TemplateBlock>
- Parameters:
model
- The model.declaration
- The loop variable.index
- The loop index.
- Throws:
TemplateException
getReturnTypeVar
public java.lang.String getReturnTypeVar()
- The variable to which to assign the return type (as a
TypeMirror
).
- Returns:
- The variable to which to assign the return type (as a
TypeMirror
).
setReturnTypeVar
public void setReturnTypeVar(java.lang.String returnTypeVar)
- The variable to which to assign the return type (as a
TypeMirror
).
- Parameters:
returnTypeVar
- The variable to which to assign the return type (as a TypeMirror
).