org.codehaus.enunciate.modules.amf
Class AS3ImportStrategy

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<L,net.sf.jelly.apt.freemarker.FreemarkerTemplateBlock>
              extended by org.codehaus.enunciate.template.strategies.EnunciateTemplateLoopStrategy<java.lang.String>
                  extended by org.codehaus.enunciate.modules.amf.AS3ImportStrategy
All Implemented Interfaces:
net.sf.jelly.apt.strategies.TemplateStrategy<net.sf.jelly.apt.freemarker.FreemarkerTemplateBlock>

public class AS3ImportStrategy
extends EnunciateTemplateLoopStrategy<java.lang.String>

Strategy for looping through the (unique) AS3 imports for a given declaration. If a WebMethod, then the imports are those for the associated result event. If a EndpointInterface then the unique imports include the result events and parameters. If a TypeDefinition, then the unique imports include each of the type's properties.

Author:
Ryan Heaton

Constructor Summary
AS3ImportStrategy(AS3ClientClassnameForMethod classnameFor)
           
 
Method Summary
protected  void addComponentTypes(com.sun.mirror.type.TypeMirror type, java.util.Set<java.lang.String> imports)
          Add the component types of the given type mirror to the given set of imports.
 net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration getDeclaration()
          The declaration for which to get the unique imports.
protected  java.util.Iterator<java.lang.String> getLoop(net.sf.jelly.apt.TemplateModel model)
           
 java.lang.String getVar()
          The variable into which to store the current import.
 boolean isIncludeComponentTypes()
          Whether to add the component types of a collection or map.
 void setDeclaration(net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration declaration)
          The declaration for which to get the unique imports.
 void setIncludeComponentTypes(boolean includeComponentTypes)
          Whether to add the component types of a collection or map.
protected  void setupModelForLoop(net.sf.jelly.apt.TemplateModel model, java.lang.String imprt, int index)
           
 void setVar(java.lang.String var)
          The variable into which to store the current import.
 
Methods inherited from class org.codehaus.enunciate.template.strategies.EnunciateTemplateLoopStrategy
getAnnotationProcessorEnvironment, getIdsToJsonSchemas, getModel, getNamespacesToPrefixes, getNamespacesToSchemas, getNamespacesToWSDLs, isVerbose, lookupPrefix, lookupSchema, lookupWSDL
 
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

AS3ImportStrategy

public AS3ImportStrategy(AS3ClientClassnameForMethod classnameFor)
Method Detail

getLoop

protected java.util.Iterator<java.lang.String> getLoop(net.sf.jelly.apt.TemplateModel model)
                                                throws net.sf.jelly.apt.TemplateException
Specified by:
getLoop in class net.sf.jelly.apt.strategies.TemplateLoopStrategy<java.lang.String,net.sf.jelly.apt.freemarker.FreemarkerTemplateBlock>
Throws:
net.sf.jelly.apt.TemplateException

addComponentTypes

protected void addComponentTypes(com.sun.mirror.type.TypeMirror type,
                                 java.util.Set<java.lang.String> imports)
                          throws freemarker.template.TemplateModelException
Add the component types of the given type mirror to the given set of imports.

Parameters:
type - The type.
imports - The imports.
Throws:
freemarker.template.TemplateModelException

setupModelForLoop

protected void setupModelForLoop(net.sf.jelly.apt.TemplateModel model,
                                 java.lang.String imprt,
                                 int index)
                          throws net.sf.jelly.apt.TemplateException
Overrides:
setupModelForLoop in class net.sf.jelly.apt.strategies.TemplateLoopStrategy<java.lang.String,net.sf.jelly.apt.freemarker.FreemarkerTemplateBlock>
Throws:
net.sf.jelly.apt.TemplateException

getVar

public java.lang.String getVar()
The variable into which to store the current import.

Returns:
The variable into which to store the current import.

setVar

public void setVar(java.lang.String var)
The variable into which to store the current import.

Parameters:
var - The variable into which to store the current import.

getDeclaration

public net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration getDeclaration()
The declaration for which to get the unique imports.

Returns:
The declaration for which to get the unique imports.

setDeclaration

public void setDeclaration(net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration declaration)
The declaration for which to get the unique imports.

Parameters:
declaration - The declaration for which to get the unique imports.

isIncludeComponentTypes

public boolean isIncludeComponentTypes()
Whether to add the component types of a collection or map.

Returns:
Whether to add the component types of a collection or map.

setIncludeComponentTypes

public void setIncludeComponentTypes(boolean includeComponentTypes)
Whether to add the component types of a collection or map.

Parameters:
includeComponentTypes - Whether to add the component types of a collection or map.