net.sf.jelly.apt.strategies
Class ImportedTypeDeclarationLoopStrategy<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<com.sun.mirror.declaration.TypeDeclaration,B>
                      extended by net.sf.jelly.apt.strategies.TypeDeclarationLoopStrategy<B>
                          extended by net.sf.jelly.apt.strategies.ImportedTypeDeclarationLoopStrategy<B>
All Implemented Interfaces:
TemplateStrategy<B>

public class ImportedTypeDeclarationLoopStrategy<B extends TemplateBlock>
extends TypeDeclarationLoopStrategy<B>

Evaluates its body for all imported types of a specified type declaration. By default, both classes and interfaces are included. This list will include the bounds of any formal type parameters. This list will NOT include annotations used by the specified type declaration.

Author:
Ryan Heaton

Constructor Summary
ImportedTypeDeclarationLoopStrategy()
           
 
Method Summary
static java.util.Collection<com.sun.mirror.declaration.TypeDeclaration> getAllImportedTypes(com.sun.mirror.declaration.TypeDeclaration typeDeclaration)
          Get all imported types of a given type declaration.
protected  java.util.Collection<com.sun.mirror.declaration.TypeDeclaration> getAllTypeDeclarations()
          Get all type declarations from the annotation processor environment.
protected  com.sun.mirror.declaration.TypeDeclaration getCurrentTypeDeclaration()
          Gets the current declaration (in a loop).
 com.sun.mirror.declaration.TypeDeclaration getDeclaration()
          The type declaration for which to get all imported types.
 void setDeclaration(com.sun.mirror.declaration.TypeDeclaration declaration)
          The type declaration for which to get all imported types.
 
Methods inherited from class net.sf.jelly.apt.strategies.TypeDeclarationLoopStrategy
getAllDeclarationsToConsiderForAnnotationFiltering, getAnnotationProcessorEnvironment, getCurrentDeclaration, getCurrentPackageDeclaration, getPackage, isIncludeClasses, isIncludeInterfaces, setIncludeClasses, setIncludeInterfaces, setPackage
 
Methods inherited from class net.sf.jelly.apt.strategies.AnnotationFilterableDeclarationLoopStrategy
getAnnotation, getAnnotationVar, getDeclarations, getExcludes, hasAnnotation, setAnnotation, setAnnotationVar, setExcludes, setupModelForLoop
 
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

ImportedTypeDeclarationLoopStrategy

public ImportedTypeDeclarationLoopStrategy()
Method Detail

getAllTypeDeclarations

protected java.util.Collection<com.sun.mirror.declaration.TypeDeclaration> getAllTypeDeclarations()
                                                                                           throws MissingParameterException
Description copied from class: TypeDeclarationLoopStrategy
Get all type declarations from the annotation processor environment.

Overrides:
getAllTypeDeclarations in class TypeDeclarationLoopStrategy<B extends TemplateBlock>
Returns:
All type declarations considered for this loop tag.
Throws:
MissingParameterException

getAllImportedTypes

public static java.util.Collection<com.sun.mirror.declaration.TypeDeclaration> getAllImportedTypes(com.sun.mirror.declaration.TypeDeclaration typeDeclaration)
Get all imported types of a given type declaration.

Parameters:
typeDeclaration - The type declaration from which to get all imported types.
Returns:
The imported types of a given type declaration.

getDeclaration

public com.sun.mirror.declaration.TypeDeclaration getDeclaration()
The type declaration for which to get all imported types.

Returns:
The type declaration for which to get all imported types.

setDeclaration

public void setDeclaration(com.sun.mirror.declaration.TypeDeclaration declaration)
The type declaration for which to get all imported types.

Parameters:
declaration - The type declaration for which to get all imported types.

getCurrentTypeDeclaration

protected com.sun.mirror.declaration.TypeDeclaration getCurrentTypeDeclaration()
Gets the current declaration (in a loop).

Returns:
the current declaration (in a loop).