xdoclet
Class TemplateSubTask

java.lang.Object
  |
  +--xdoclet.DocletSupport
        |
        +--xdoclet.SubTask
              |
              +--xdoclet.TemplateSubTask
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AbstractEjbCodeGeneratorSubTask, DocumentTagsSubTask, InfoSubTask, MBeanInterfaceSubTask, MLetSubTask, NoInnerClassSubTask, OpenJMXDescriptionAdapterSubTask, WebWorkActionDocsSubTask, WebWorkConfigPropertiesSubTask, XmlSubTask

public class TemplateSubTask
extends SubTask

Generates The template file specified in templateFile configuration parameter. It operates in two modes: per class and single output.

Version:
$Revision: 1.29 $
Author:
Ara Abrahamian (ara_e@email.com)
See Also:
Serialized Form

Inner Class Summary
static class TemplateSubTask.ExtentTypes
           
 
Field Summary
static java.lang.String SUBTASK_NAME
           
 
Fields inherited from class xdoclet.DocletSupport
currentTag
 
Constructor Summary
TemplateSubTask()
           
 
Method Summary
 void addPackageSubstitution(PackageTagsHandler.PackageSubstitution ps)
          Adds a set of files (nested fileset attribute).
protected  java.io.File beanFile(com.sun.javadoc.ClassDoc clazz)
          Returns the File pointing to where current class is stored.
 void copyAttributesFrom(TemplateSubTask src)
           
protected  void engineFinished()
           
protected  void engineStarted()
           
 void execute()
          Called to start execution of the sub-task.
protected  void generateForClass(com.sun.javadoc.ClassDoc clazz)
          Processed template for clazz and generates output file for clazz.
 java.lang.String getDestinationFile()
           
 TemplateEngine getEngine()
           
 java.lang.String getExtent()
           
protected  java.lang.String getGeneratedFileName(com.sun.javadoc.ClassDoc clazz)
          Returns class name for the generated file.
 java.lang.String getHavingClassTag()
           
 java.lang.String getOfType()
           
 java.util.Vector getPackageSubstitutions()
           
 TemplateParser getParser()
           
 java.lang.String getSubTaskClassName()
           
 java.lang.String getSubTaskName()
           
 java.net.URL getTemplateURL()
           
 void init()
          Initializes SubTask.
 boolean isGuessGenerationNeeded()
           
 boolean isPackageSubstitutionInheritanceSupported()
          By default supports, but some subtasks may not support because global packageSubstitution is for public interfaces/classes, not good for impl classes.
 boolean isPrefixWithPackageStructure()
           
protected static java.lang.String javaFile(java.lang.String className)
          Converts the full qualified class name to a valid path with File.separator characters instead of .
protected  boolean matchesGenerationRules(com.sun.javadoc.ClassDoc clazz)
          Returns true if output not already generated for clazz, and is of the specified type and has the specified class tag; false otherwise.
 void setDestinationFile(java.lang.String destinationFile)
           
 void setEngine(TemplateEngine engine)
           
 void setExtent(TemplateSubTask.ExtentTypes extent)
           
protected  void setExtentValue(java.lang.String extent)
           
 void setGuessGenerationNeeded(boolean guessGenerationNeeded)
           
 void setHavingClassTag(java.lang.String havingClassTag)
           
 void setOfType(java.lang.String ofType)
           
 void setPackageSubstitutionInheritanceSupported(boolean packageSubstitutionInheritanceSupported)
           
 void setPackageSubstitutions(java.util.Vector packageSubstitutions)
           
 void setParser(TemplateParser parser)
           
 void setPrefixWithPackageStructure(boolean prefixWithPackageStructure)
           
 void setSubTaskClassName(java.lang.String subTaskClassName)
           
 void setTemplateFile(java.io.File templateFile)
          This method is called from Ant in