org.codehaus.enunciate.template.freemarker
Class ClassnameForMethod

java.lang.Object
  extended by org.codehaus.enunciate.template.freemarker.ClientPackageForMethod
      extended by org.codehaus.enunciate.template.freemarker.ClassnameForMethod
All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel
Direct Known Subclasses:
ClientClassnameForMethod

public class ClassnameForMethod
extends ClientPackageForMethod

Used to output a reference for an accessor or parameter or declaration.

Author:
Ryan Heaton

Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
ClassnameForMethod(java.util.Map<java.lang.String,java.lang.String> conversions)
           
 
Method Summary
 java.lang.String convert(Accessor accessor)
          Converts the type of an accessor.
 java.lang.String convert(ImplicitChildElement childElement)
          Converts the specified implicit child element.
 java.lang.String convert(com.sun.mirror.declaration.PackageDeclaration packageDeclaration)
          Converts the package declaration to its client-side package value.
 java.lang.String convert(com.sun.mirror.declaration.TypeDeclaration declaration)
          Returns the client-side package value for the given type declaration.
 java.lang.String convert(com.sun.mirror.type.TypeMirror typeMirror)
          Returns the client-side package value for the given type.
 java.lang.String convert(com.sun.mirror.declaration.TypeParameterDeclaration typeParameterDeclaration)
          Converts the specified type parameter declaration.
protected  java.lang.String convertPackage(com.sun.mirror.declaration.PackageDeclaration pkg)
           
 java.lang.String convertUnwrappedObject(java.lang.Object unwrapped)
          Converts an unwrapped object.
 java.lang.Object exec(java.util.List list)
          Gets the client-side package for the type, type declaration, package, or their string values.
protected  java.lang.String getPackageSeparator()
           
 boolean isJdk15()
          Whether this converter is enabled to output jdk 15 compatible classes.
 void setJdk15(boolean jdk15)
          Whether this converter is enabled to output jdk 15 compatible classes.
 
Methods inherited from class org.codehaus.enunciate.template.freemarker.ClientPackageForMethod
convert, isUseClientNameConversions, setUseClientNameConversions, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassnameForMethod

public ClassnameForMethod(java.util.Map<java.lang.String,java.lang.String> conversions)
Method Detail

exec

public java.lang.Object exec(java.util.List list)
                      throws freemarker.template.TemplateModelException
Description copied from class: ClientPackageForMethod
Gets the client-side package for the type, type declaration, package, or their string values.

Specified by:
exec in interface freemarker.template.TemplateMethodModel
Specified by:
exec in interface freemarker.template.TemplateMethodModelEx
Overrides:
exec in class ClientPackageForMethod
Parameters:
list - The arguments.
Returns:
The string value of the client-side package.
Throws:
freemarker.template.TemplateModelException

convertUnwrappedObject

public java.lang.String convertUnwrappedObject(java.lang.Object unwrapped)
                                        throws freemarker.template.TemplateModelException
Description copied from class: ClientPackageForMethod
Converts an unwrapped object.

Overrides:
convertUnwrappedObject in class ClientPackageForMethod
Parameters:
unwrapped - The unwrapped object to convert.
Returns:
The conversion.
Throws:
freemarker.template.TemplateModelException

convert

public java.lang.String convert(com.sun.mirror.declaration.TypeParameterDeclaration typeParameterDeclaration)
                         throws freemarker.template.TemplateModelException
Converts the specified type parameter declaration.

Parameters:
typeParameterDeclaration - The type parameter declaration.
Returns:
The type parameter declaration.
Throws:
freemarker.template.TemplateModelException

convert

public java.lang.String convert(ImplicitChildElement childElement)
                         throws freemarker.template.TemplateModelException
Converts the specified implicit child element.

Parameters:
childElement - The implicit child element.
Returns:
The conversion.
Throws:
freemarker.template.TemplateModelException

convert

public java.lang.String convert(Accessor accessor)
                         throws freemarker.template.TemplateModelException
Converts the type of an accessor.

Parameters:
accessor - The accessor.
Returns:
The accessor.
Throws:
freemarker.template.TemplateModelException

convert

public java.lang.String convert(com.sun.mirror.type.TypeMirror typeMirror)
                         throws freemarker.template.TemplateModelException
Description copied from class: ClientPackageForMethod
Returns the client-side package value for the given type.

Overrides:
convert in class ClientPackageForMethod
Parameters:
typeMirror - The type.
Returns:
The client-side package value for the type.
Throws:
freemarker.template.TemplateModelException - If the type mirror cannot be converted for some reason.

convert

public java.lang.String convert(com.sun.mirror.declaration.TypeDeclaration declaration)
                         throws freemarker.template.TemplateModelException
Description copied from class: ClientPackageForMethod
Returns the client-side package value for the given type declaration.

Overrides:
convert in class ClientPackageForMethod
Parameters:
declaration - The declaration.
Returns:
The client-side package value for the declaration.
Throws:
freemarker.template.TemplateModelException

convertPackage

protected java.lang.String convertPackage(com.sun.mirror.declaration.PackageDeclaration pkg)

getPackageSeparator

protected java.lang.String getPackageSeparator()

convert

public java.lang.String convert(com.sun.mirror.declaration.PackageDeclaration packageDeclaration)
Description copied from class: ClientPackageForMethod
Converts the package declaration to its client-side package value.

Overrides:
convert in class ClientPackageForMethod
Parameters:
packageDeclaration - The package declaration.
Returns:
The package declaration.

isJdk15

public boolean isJdk15()
Whether this converter is enabled to output jdk 15 compatible classes.

Returns:
Whether this converter is enabled to output jdk 15 compatible classes.

setJdk15

public void setJdk15(boolean jdk15)
Whether this converter is enabled to output jdk 15 compatible classes.

Parameters:
jdk15 - Whether this converter is enabled to output jdk 15 compatible classes.