xdoclet
public class TemplateSubTask extends SubTask
templateFile
configuration parameter. It operates in two modes: per class and single output.
Version: $Revision: 1.79 $
UNKNOWN: Sep 25, 2001 name = "template" parent = "xdoclet.DocletTask" display-name = "Standard Subtask" name = "destinationFile" description = "The destination file name. If a {0} is found it's assumed that a * per class output generation is needed, so {0} is substituted with class name; otherwise a single file is * generated with the specified name." required = "Yes" name = "extent" description = "You can control the extent in which the type search occurs. Valid values * are: concrete-type , superclass and hierarchy ." required = "No. Default is \"hierarchy\""
| Nested Class Summary | |
|---|---|
| static class | TemplateSubTask.ExtentTypes |
| static class | TemplateSubTask.OfType
Applicable only to per class output generation. |
| Constructor Summary | |
|---|---|
| TemplateSubTask() | |
| Method Summary | |
|---|---|
| void | addOfType(TemplateSubTask.OfType ofType) |
| protected void | addOfType(String ofType) |
| void | addPackageSubstitution(PackageTagsHandler.PackageSubstitution ps)
Substitutes the package of the generated files.
|
| void | copyAttributesFrom(TemplateSubTask src)
Describe what the method does
|
| protected void | engineFinished()
Describe what the method does
|
| protected void | engineStarted()
Describe what the method does
|
| void | execute()
Describe what the method does
|
| protected void | generateForClass(XClass clazz)
Processed template for clazz and generates output file for clazz.
|
| boolean | getAcceptAbstractClasses() |
| boolean | getAcceptInterfaces() |
| String | getDestinationFile()
Gets the DestinationFile attribute of the TemplateSubTask object
|
| TemplateEngine | getEngine()
Gets the Engine attribute of the TemplateSubTask object
|
| String | getExtent()
Gets the Extent attribute of the TemplateSubTask object
|
| protected String | getGeneratedFileName(XClass clazz)
Returns the filename of the generated file for a class. |
| GenerationManager | getGenerationManager() |
| String | getHavingClassTag()
Gets the HavingClassTag attribute of the TemplateSubTask object
|
| String[] | getOfType()
Gets the OfType attribute of the TemplateSubTask object
|
| ArrayList | getPackageSubstitutions()
Gets the PackageSubstitutions attribute of the TemplateSubTask object
|
| String | getSubTaskClassName()
Gets the SubTaskClassName attribute of the TemplateSubTask object
|
| URL | getTemplateURL()
Gets the TemplateURL attribute of the TemplateSubTask object
|
| void | init(XJavaDoc xJavaDoc)
Describe what the method does
|
| 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()
Gets the PrefixWithPackageStructure attribute of the TemplateSubTask object
|
| protected static String | javaFile(String className)
Converts the fully qualified class name to a valid path with File.separator characters instead of "." characters
and class name postfixed by a ".java".
|
| protected boolean | matchesGenerationRules(XClass clazz)
Returns true if output not already generated for clazz, and is of the specified type and has the specified class
tag; false otherwise. |
| protected boolean | processInnerClasses()
Subclasses should override this method and return true if they want startProcessPerClass() to process inner
classes too.
|
| void | setAcceptAbstractClasses(boolean acceptAbstractClasses)
Indicates whether or not to generate for abstract classes.
|
| void | setAcceptInterfaces(boolean acceptInterfaces)
Indicates whether or not to generate for interfaces.
|
| void | setDestinationFile(String destinationFile)
The destination file name. |
| void | setEngine(TemplateEngine engine)
Sets the Engine attribute of the TemplateSubTask object
|
| void | setExtent(TemplateSubTask.ExtentTypes extent)
You can control the extent in which the type search occurs. |
| protected void | setExtentValue(String extent)
Sets the ExtentValue attribute of the TemplateSubTask object
|
| protected void | setGenerationManager(GenerationManager gM)
Sets the GenerationManager attribute of the TemplateSubTask object
|
| void | setHavingClassTag(String havingClassTag)
Sets the HavingClassTag attribute of the TemplateSubTask object
|
| void | setOfType(String ofType) |
| void | setPackageSubstitutionInheritanceSupported(boolean packageSubstitutionInheritanceSupported)
Indicates whether or not package substitution should be inherited
|
| void | setPackageSubstitutions(ArrayList packageSubstitutions)
Sets the PackageSubstitutions attribute of the TemplateSubTask object
|
| void | setPrefixWithPackageStructure(boolean prefixWithPackageStructure)
Indicates whether or not to prefix with package structure.
|
| void | setSubTaskClassName(String subTaskClassName)
Sets the SubTaskClassName attribute of the TemplateSubTask object
|
| void | setTemplateFile(File templateFile)
Sets the name of the template file to use for generation
|
| void | setTemplateURL(URL templateURL)
This method should be called to set a template file programmatically. |
| protected void | startEngine(URL templateURL, File outputFile)
Describe what the method does
|
| protected void | startProcess()
Describe what the method does
|
| protected void | startProcessForAll() |
| protected void | startProcessPerClass() |
| void | validateOptions()
Called to validate configuration parameters.
|
Parameters: ps The feature to be added to the Fileset attribute
Parameters: src Describe what the parameter does
Throws: TemplateException Describe the exception
Throws: XDocletException Describe the exception
Throws: XDocletException Describe the exception
Parameters: clazz Description of Parameter
Throws: XDocletException Description of Exception
Returns: The DestinationFile value
Returns: The Engine value
Returns: The Extent value
Parameters: clazz the class being processed
Returns: the corresponding filename
Throws: XDocletException Description of Exception
Returns: The HavingClassTag value
Returns: The OfType value
Returns: The PackageSubstitutions value
Returns: The SubTaskClassName value
Returns: The TemplateURL value
Parameters: xJavaDoc
Throws: XDocletException Describe the exception
Returns: true
Returns: The PrefixWithPackageStructure value
Parameters: className class name
Returns: file path
Parameters: clazz Description of Parameter
Returns: Description of the Returned Value
Throws: XDocletException Description of Exception
Returns:
Parameters: acceptAbstractClasses
UNKNOWN: "No, default is 'true'"
Parameters: acceptInterfaces
UNKNOWN: "No, default is 'true'"
Parameters: destinationFile The new DestinationFile value
UNKNOWN: No,defaultis determinedbythis task.
Parameters: engine The new Engine value
UNKNOWN:
Parameters: extent The new Extent value
UNKNOWN:
Parameters: extent The new ExtentValue value
Parameters: gM The new GenerationManager value
Parameters: havingClassTag The new HavingClassTag value
Parameters: packageSubstitutionInheritanceSupported The new PackageSubstitutionInheritanceSupported value
UNKNOWN: "No, default is 'true'"
Parameters: packageSubstitutions The new PackageSubstitutions value
Parameters: prefixWithPackageStructure The new PrefixWithPackageStructure value
UNKNOWN: "No, default is 'true'"
Parameters: subTaskClassName The new SubTaskClassName value
UNKNOWN:
Parameters: templateFile the file name (real file!) of the template
Throws: XDocletException
UNKNOWN: No,defaultis determinedbythis task.
Parameters: templateURL
UNKNOWN:
Parameters: templateURL Describe what the parameter does outputFile Describe what the parameter does
Throws: TemplateException Describe the exception
Throws: XDocletException Describe the exception
Throws: XDocletException Description of Exception