net.sf.jelly.apt.strategies
Class MethodDeclarationLoopStrategy<B extends TemplateBlock>

java.lang.Object
  extended by net.sf.jelly.apt.strategies.TemplateStrategyControl<B>
      extended by net.sf.jelly.apt.strategies.TemplateBlockStrategy<B>
          extended by net.sf.jelly.apt.strategies.TemplateLoopStrategy<D,B>
              extended by net.sf.jelly.apt.strategies.DeclarationLoopStrategy<D,B>
                  extended by net.sf.jelly.apt.strategies.AnnotationFilterableDeclarationLoopStrategy<M,B>
                      extended by net.sf.jelly.apt.strategies.MemberDeclarationLoopStrategy<E,B>
                          extended by net.sf.jelly.apt.strategies.ExecutableDeclarationLoopStrategy<com.sun.mirror.declaration.MethodDeclaration,B>
                              extended by 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

Constructor Summary
MethodDeclarationLoopStrategy()
           
 
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.ExecutableDeclarationLoopStrategy
getCurrentDeclaration
 
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 net.sf.jelly.apt.strategies.AnnotationFilterableDeclarationLoopStrategy
getAnnotation, getAnnotationVar, getDeclarations, getExcludes, hasAnnotation, setAnnotation, setAnnotationVar, setExcludes
 
Methods inherited from class net.sf.jelly.apt.strategies.DeclarationLoopStrategy
getIndexVar, getLoop, getVar, setIndexVar, setVar
 
Methods inherited from class net.sf.jelly.apt.strategies.TemplateLoopStrategy
preProcess, processBody
 
Methods inherited from class net.sf.jelly.apt.strategies.TemplateBlockStrategy
postProcess
 
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

MethodDeclarationLoopStrategy

public MethodDeclarationLoopStrategy()
Method Detail

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).