User: pathoss
Date: 02/05/13 01:57:35
Modified: core/src/xdoclet Tag: MODULE_REFACTORING_BRANCH
TemplateSubTask.java
Log:
Done some cleanup.
Revision Changes Path
No revision
No revision
1.41.2.6 +29 -51 xdoclet/core/src/xdoclet/TemplateSubTask.java
Index: TemplateSubTask.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/TemplateSubTask.java,v
retrieving revision 1.41.2.5
retrieving revision 1.41.2.6
diff -u -w -r1.41.2.5 -r1.41.2.6
--- TemplateSubTask.java 12 May 2002 11:58:01 -0000 1.41.2.5
+++ TemplateSubTask.java 13 May 2002 08:57:34 -0000 1.41.2.6
@@ -26,12 +26,11 @@
import xdoclet.util.Translator;
/**
- * Generates The template file specified in templateFile configuration
- * parameter. It operates in two modes: per class and single output.
+ * Generates The template file specified in templateFile configuration parameter.
It operates in two modes: per class and single output.
*
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Sep 25, 2001
- * @version $Revision: 1.41.2.5 $
+ * @version $Revision: 1.41.2.6 $
*/
public class TemplateSubTask extends SubTask
{
@@ -46,9 +45,8 @@
private boolean prefixWithPackageStructure = true;
/**
- * 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.
+ * 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.
*
* @see #setDestinationFile(java.lang.String)
* @see #getDestinationFile()
@@ -56,11 +54,9 @@
private String destinationFile = null;
/**
- * Applicable only to per class output generation. Specify full qualified
- * class name from which classes should be derived. Output generation is
- * performed only for classes of one of the types defined in this property,
- * it's a comma-separated list. You can control the extent in which the type
- * search occures by using 'extent' property.
+ * Applicable only to per class output generation. Specify full qualified class
name from which classes should be derived. Output generation is performed
+ * only for classes of one of the types defined in this property, it's a
comma-separated list. You can control the extent in which the type search occures
+ * by using 'extent' property.
*
* @see #setOfType(java.lang.String)
* @see #getOfType()
@@ -70,9 +66,8 @@
private String ofType = null;
/**
- * You can control the extent in which the type search occures. Valid values
- * are: <i>concrete-type</i> , <i>superclass</i> and <i>hierarchy</i> which
- * is the default.
+ * You can control the extent in which the type search occures. Valid values
are: <i>concrete-type</i> , <i>superclass</i> and <i>hierarchy</i> which is the
+ * default.
*
* @see #setExtent(TemplateSubTask.ExtentTypes)
* @see #getExtent()
@@ -82,8 +77,7 @@
private String extent = "hierarchy";
/**
- * A class should have the class tag defined in this property in order to be
- * processed and output generated for.
+ * A class should have the class tag defined in this property in order to be
processed and output generated for.
*
* @see #setHavingClassTag(java.lang.String)
* @see #getHavingClassTag()
@@ -102,9 +96,7 @@
private GenerationManager generationManager;
/**
- * Converts the full qualified class name to a valid path with
- * File.separator characters instead of . characters and class name
- * postfixed by a ".java".
+ * Converts the full qualified class name to a valid path with File.separator
characters instead of . characters and class name postfixed by a ".java".
*
* @param className Description of Parameter
* @return Description of the Returned Value
@@ -135,9 +127,7 @@
}
/**
- * By default supports, but some subtasks may not support because global
- * packageSubstitution is for public interfaces/classes, not good for impl
- * classes.
+ * By default supports, but some subtasks may not support because global
packageSubstitution is for public interfaces/classes, not good for impl classes.
*
* @return true
*/
@@ -237,8 +227,7 @@
}
/**
- * Gets the PrefixWithPackageStructure attribute of the TemplateSubTask
- * object
+ * Gets the PrefixWithPackageStructure attribute of the TemplateSubTask object
*
* @return The PrefixWithPackageStructure value
*/
@@ -258,11 +247,9 @@
}
/**
- * Sets the PackageSubstitutionInheritanceSupported attribute of the
- * TemplateSubTask object
+ * Sets the PackageSubstitutionInheritanceSupported attribute of the
TemplateSubTask object
*
- * @param packageSubstitutionInheritanceSupported The new
- * PackageSubstitutionInheritanceSupported value
+ * @param packageSubstitutionInheritanceSupported The new
PackageSubstitutionInheritanceSupported value
*/
public void setPackageSubstitutionInheritanceSupported(boolean
packageSubstitutionInheritanceSupported)
{
@@ -280,11 +267,9 @@
}
/**
- * Sets the PrefixWithPackageStructure attribute of the TemplateSubTask
- * object
+ * Sets the PrefixWithPackageStructure attribute of the TemplateSubTask object
*
- * @param prefixWithPackageStructure The new PrefixWithPackageStructure
- * value
+ * @param prefixWithPackageStructure The new PrefixWithPackageStructure value
*/
public void setPrefixWithPackageStructure(boolean prefixWithPackageStructure)
{
@@ -322,8 +307,7 @@
}
/**
- * This method should be called to set a template file programmatically. The
- * URL is typically obtained with a getClass().getResource( templateName )
+ * This method should be called to set a template file programmatically. The
URL is typically obtained with a getClass().getResource( templateName )
*
* @param templateFile the URL of the template file
*/
@@ -333,8 +317,7 @@
}
/**
- * This method is called from Ant in <template templateFile="blabla"/> Don't
- * call this explicitly, use the URL method instead.
+ * This method is called from Ant in <template templateFile="blabla"/> Don't
call this explicitly, use the URL method instead.
*
* @param templateFile the file name (real file!) of the template
*/
@@ -480,7 +463,7 @@
String packageName = isPackageSubstitutionInheritanceSupported() == true ?
PackageTagsHandler.packageNameAsPathFor(pak) : null;
String qualifiedName = clazz.qualifiedName();
- int lastDot = qualifiedName.lastIndexOf(".");
+ int lastDot = qualifiedName.lastIndexOf('.');
String name = qualifiedName.substring(lastDot + 1);
String destinationFile = MessageFormat.format(getDestinationFile(), new
Object[]{name});
@@ -533,9 +516,9 @@
log.debug("getHavingClassTag()=" + getHavingClassTag());
}
- boolean per_class = isGenerationPerClass();
+ boolean perClass = isGenerationPerClass();
- if (per_class) {
+ if (perClass) {
startProcessPerClass();
}
else {
@@ -553,12 +536,12 @@
getEngine().setTemplateURL(getTemplateURL());
- File output_file = new File(getDestDir(), getDestinationFile());
+ File outputFile = new File(getDestDir(), getDestinationFile());
try {
setGenerationManager(new GenerationManager(this));
- if (generationManager.isGenerationNeeded(output_file)) {
- startEngine(getTemplateURL(), output_file);
+ if (generationManager.isGenerationNeeded(outputFile)) {
+ startEngine(getTemplateURL(), outputFile);
}
}
catch (TemplateException e) {
@@ -600,9 +583,8 @@
}
/**
- * Returns true if output not already generated for clazz, and is of the
- * specified type and has the specified class tag; false otherwise. If
- * returned false, no output file is generated for clazz.
+ * Returns true if output not already generated for clazz, and is of the
specified type and has the specified class tag; false otherwise. If returned false,
+ * no output file is generated for clazz.
*
* @param clazz Description of Parameter
* @return Description of the Returned Value
@@ -660,9 +642,7 @@
}
if (file.exists()) {
- if (log.isDebugEnabled()) {
log.debug("File exists.");
- }
// Check modification timestamps
setGenerationManager(new GenerationManager(this));
@@ -681,9 +661,7 @@
throw (XDocletException) e;
}
else {
- if (log.isDebugEnabled()) {
log.debug("generateForClass()");
- }
throw new XDocletException(e,
Translator.getString("running_failed"));
}
}
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel