Update of /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24542
Modified Files: AbstractProgramElementTagsHandler.java TranslatorTagsHandler.java PackageTagsHandler.java MethodTagsHandler.java Log Message: Misc javadoc & template tag doc improvements (XDT-1034). Index: AbstractProgramElementTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/AbstractProgramElementTagsHandler.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** AbstractProgramElementTagsHandler.java 29 Apr 2003 19:14:05 -0000 1.15 --- AbstractProgramElementTagsHandler.java 1 Sep 2004 22:43:50 -0000 1.16 *************** *** 46,54 **** /** ! * Returns the not-full-qualified name of the current class without the package name. * ! * @param clazz Description of Parameter ! * @return Description of the Returned Value ! * @doc.tag type="content" */ public static String getClassNameFor(XClass clazz) --- 46,53 ---- /** ! * Returns the not-full-qualified name of the specified class without the package name. * ! * @param clazz class ! * @return classname */ public static String getClassNameFor(XClass clazz) *************** *** 60,66 **** * Returns the full-qualified name of the current class with the package name. * ! * @param clazz Description of Parameter ! * @return Description of the Returned Value ! * @doc.tag type="content" */ public static String getFullClassNameFor(XClass clazz) --- 59,64 ---- * Returns the full-qualified name of the current class with the package name. * ! * @param clazz class ! * @return fully qualified classname */ public static String getFullClassNameFor(XClass clazz) *************** *** 70,78 **** /** ! * Returns the full-qualified name of the superclass of the current class. * ! * @param clazz Description of Parameter ! * @return Description of the Returned Value ! * @doc.tag type="content" */ public static String getFullSuperclassNameFor(XClass clazz) --- 68,75 ---- /** ! * Returns the full-qualified name of the superclass of the specified class. * ! * @param clazz class ! * @return superclass' fully qualified classname */ public static String getFullSuperclassNameFor(XClass clazz) *************** *** 187,192 **** * Used to protect returned arrays from being modified (sorted, reordered for example). * ! * @param objects ! * @return */ protected static Object[] makeCopyOfArray(Object[] objects) --- 184,189 ---- * Used to protect returned arrays from being modified (sorted, reordered for example). * ! * @param objects array of objects ! * @return copy of array */ protected static Object[] makeCopyOfArray(Object[] objects) *************** *** 246,255 **** /** ! * Sets the vaSoulue of match variable. * * @param template The body of the block tag * @param attributes The attributes of the template tag * @exception XDocletException Description of Exception ! * @doc.tag type="content" * @doc.param name="value" optional="false" description="The new value for matchPattern." */ --- 243,252 ---- /** ! * Sets the value of match variable. * * @param template The body of the block tag * @param attributes The attributes of the template tag * @exception XDocletException Description of Exception ! * @doc.tag type="block" * @doc.param name="value" optional="false" description="The new value for matchPattern." */ Index: TranslatorTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/TranslatorTagsHandler.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** TranslatorTagsHandler.java 10 Jul 2004 14:04:24 -0000 1.9 --- TranslatorTagsHandler.java 1 Sep 2004 22:43:50 -0000 1.10 *************** *** 13,16 **** --- 13,19 ---- /** + * Wrapper around the [EMAIL PROTECTED] xdoclet.util.Translator}, allowing text in generated files to be localised using the + * resource bundles generated by the [EMAIL PROTECTED] xdoclet.modules.externalizer.ExternalizerSubTask externalizer} subtask. + * * @author <a href="mailto:[EMAIL PROTECTED]">Andrew Stevens</a> * @created Jan 24, 2002 Index: PackageTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/PackageTagsHandler.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** PackageTagsHandler.java 16 Aug 2004 17:03:34 -0000 1.13 --- PackageTagsHandler.java 1 Sep 2004 22:43:50 -0000 1.14 *************** *** 17,20 **** --- 17,22 ---- /** + * Tags which manipulate package names and packages, including substitutions. + * * @author Ara Abrahamian ([EMAIL PROTECTED]) * @created Oct 14, 2001 *************** *** 25,33 **** { /** ! * Gets the PackageNameFor attribute of the PackageTagsHandler class * ! * @param pak Describe what the parameter does ! * @param withSubstitution ! * @return The PackageNameFor value */ public static String getPackageNameFor(XPackage pak, boolean withSubstitution) --- 27,35 ---- { /** ! * Gets the name of a package, optionally applying any substitutions. * ! * @param pak package ! * @param withSubstitution whether to apply any substitutions ! * @return package name */ public static String getPackageNameFor(XPackage pak, boolean withSubstitution) *************** *** 36,39 **** --- 38,47 ---- } + /** + * Gets a package name with any subsitutions applied. + * + * @param packageName package name + * @return package name + */ public static String getPackageNameFor(String packageName) { *************** *** 45,49 **** * </tt> will be replaced by <tt>packages</tt> , else the one of the direct container of the current class. * ! * @param packageName The (current) package name, on which substitutuion shall take place. * @param withSubstitution true if package substitutions shall take place. * @return The package name after substitutions. --- 53,57 ---- * </tt> will be replaced by <tt>packages</tt> , else the one of the direct container of the current class. * ! * @param packageName The (current) package name, on which substitution shall take place. * @param withSubstitution true if package substitutions shall take place. * @return The package name after substitutions. *************** *** 87,94 **** /** ! * Gets the PackageSubstitutions attribute of the PackageTagsHandler class * ! * @param subtaskName Describe what the parameter does ! * @return The PackageSubstitutions value */ public static ArrayList getPackageSubstitutions(String subtaskName) --- 95,102 ---- /** ! * Gets any PackageSubstitutions defined for a specified subtask. * ! * @param subtaskName subtask name ! * @return ArrayList of substitutions */ public static ArrayList getPackageSubstitutions(String subtaskName) *************** *** 116,123 **** /** ! * Returns the current package name as path * ! * @param pak Description of Parameter ! * @return current package name as path * @doc.tag type="content" */ --- 124,131 ---- /** ! * Returns a package name as a path, after applying any substitutions. * ! * @param pak package ! * @return package name as path * @doc.tag type="content" */ *************** *** 127,130 **** --- 135,145 ---- } + /** + * Returns a package name as a path, without applying any substitutions. + * + * @param pak package + * @return package name as path + * @doc.tag type="content" + */ public static String packageNameAsPathWithoutSubstitutionFor(XPackage pak) { *************** *** 133,140 **** /** ! * Returns the current package name as path * ! * @param qualifiedName Description of Parameter ! * @return current package name as path * @doc.tag type="content" */ --- 148,155 ---- /** ! * Returns a package name as a path, after applying any substitutions. * ! * @param qualifiedName package name ! * @return package name as path * @doc.tag type="content" */ *************** *** 158,163 **** /** ! * Replace the first occurance of oldOne in original with newOne Or returns the original string if oldOne is not ! * found * * @param original String in which replacement should occour --- 173,178 ---- /** ! * Replace the first occurrence of <code>oldOne</code> in <code>original</code> with <code>newOne</code>, or returns ! * the original string if <code>oldOne</code> is not found. * * @param original String in which replacement should occour *************** *** 216,220 **** /** ! * Iterates over all packages loaded by javadoc. Subsequent calls to forAllClasses will only iterate over the * classes in the current package. * --- 231,235 ---- /** ! * Iterates over all packages loaded by XJavadoc. Subsequent calls to forAllClasses will only iterate over the * classes in the current package. * *************** *** 255,259 **** /** ! * Returns the current package name as path * * @return current package name as path --- 270,274 ---- /** ! * Returns the current package name as a path. * * @return current package name as path *************** *** 269,278 **** * It's good practice to put interfaces (such as remote/local interfaces, data objects and home interfaces) in a * separate "interfaces" package rather than in the EJB bean implementation package. Previous versions of XDoclet ! * dictated this behavior, so if package name of a bean ended with .beans or .ejb interfaces were put into ! * .interfaces package. It's no more the case. You have full control over it. If you don't use a packageSubstitution ! * element, then all interfaces are generated to the same package as the bean implementation class. But if you want ! * to follow the pattern and put interfaces into a separate package you can, by providing the list of package name ! * tails that interfaces of beans inside that packages should be placed into the package you define. For example ! * interfaces of test.ejb.CustomerBean will be placed in test.interfaces by the following packageSubstitution:<p/> * * <pre><code> --- 284,294 ---- * It's good practice to put interfaces (such as remote/local interfaces, data objects and home interfaces) in a * separate "interfaces" package rather than in the EJB bean implementation package. Previous versions of XDoclet ! * dictated this behavior, so if package name of a bean ended with <code>.beans</code> or <code>.ejb</code> ! * interfaces were put into .interfaces package. It's no more the case. You have full control over it. If you don't ! * use a <code>packageSubstitution</code> element, then all interfaces are generated to the same package as the bean ! * implementation class. But if you want to follow the pattern and put interfaces into a separate package you can, ! * by providing the list of package name tails that interfaces of beans inside that packages should be placed into ! * the package you define. For example interfaces of <code>test.ejb.CustomerBean</code> will be placed in <code>test.interfaces</code> ! * by the following <code>packageSubstitution</code>:<p/> * * <pre><code> *************** *** 280,284 **** *</code></pre> <p/> * ! * By using the useFirst attribute, you can tell xdoclet to substitute the first occurence and not the last. <br/> * Now if you have a structure like<p/> * --- 296,301 ---- *</code></pre> <p/> * ! * By using the <code>useFirst</code> attribute, you can tell xdoclet to substitute the first occurrence and not the ! * last. <br/> * Now if you have a structure like<p/> * *************** *** 356,360 **** * Sets the useFirst attribute * ! * @param first should the first occurence be used or not? */ public void setUseFirst(boolean first) --- 373,377 ---- * Sets the useFirst attribute * ! * @param first should the first occurrence be used or not? */ public void setUseFirst(boolean first) Index: MethodTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/MethodTagsHandler.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** MethodTagsHandler.java 28 Aug 2004 08:36:25 -0000 1.31 --- MethodTagsHandler.java 1 Sep 2004 22:43:50 -0000 1.32 *************** *** 219,225 **** /** ! * Describe what the method does * ! * @return Describe the return value * @exception XDocletException Describe the exception * @doc.tag type="content" --- 219,225 ---- /** ! * Any modifiers (static, volatile, etc.) for the current method. * ! * @return modifiers * @exception XDocletException Describe the exception * @doc.tag type="content" *************** *** 234,238 **** * * @param attributes The attributes of the template tag ! * @return Description of the Returned Value * @exception XDocletException Description of Exception * @see ClassTagsHandler#classComment(java.util.Properties) --- 234,238 ---- * * @param attributes The attributes of the template tag ! * @return comment * @exception XDocletException Description of Exception * @see ClassTagsHandler#classComment(java.util.Properties) *************** *** 628,633 **** * Returns the return type of the current method. * ! * @param attributes ! * @return Description of the Returned Value * @exception XDocletException Description of Exception * @doc.tag type="content" --- 628,633 ---- * Returns the return type of the current method. * ! * @param attributes The attributes of the template tag ! * @return return type * @exception XDocletException Description of Exception * @doc.tag type="content" *************** *** 651,654 **** --- 651,663 ---- } + /** + * Evaluates the body if the return type of the current method equals the specified value. + * + * @param template The body of the block tag + * @param attributes The attributes of the template tag + * @exception XDocletException Description of Exception + * @doc.tag type="block" + * @doc.param name="type" optional="false" description="The type to compare." + */ public void ifIsOfType(String template, Properties attributes) throws XDocletException { *************** *** 657,660 **** --- 666,678 ---- } + /** + * Evaluates the body if the return type of the current method doesn't equal the specified value. + * + * @param template The body of the block tag + * @param attributes The attributes of the template tag + * @exception XDocletException Description of Exception + * @doc.tag type="block" + * @doc.param name="type" optional="false" description="The type to compare." + */ public void ifIsNotOfType(String template, Properties attributes) throws XDocletException { *************** *** 710,714 **** * Returns the current method name. Used inside block elements. * ! * @return Description of the Returned Value * @exception XDocletException Description of Exception */ --- 728,732 ---- * Returns the current method name. Used inside block elements. * ! * @return method name * @exception XDocletException Description of Exception */ *************** *** 722,726 **** * name and decapitalize it. * ! * @return Description of the Returned Value * @exception XDocletException Description of Exception * @doc.tag type="content" --- 740,744 ---- * name and decapitalize it. * ! * @return property name * @exception XDocletException Description of Exception * @doc.tag type="content" *************** *** 777,781 **** /** ! * Evaluates the body if value for the method tag equals the specified value. * * @param template The body of the block tag --- 795,799 ---- /** ! * Evaluates the body if the specified method (or current method if none is supplied) is a getter method. * * @param template The body of the block tag *************** *** 783,791 **** * @exception XDocletException Description of Exception * @doc.tag type="block" ! * @doc.param name="tagName" optional="false" description="The tag name." ! * @doc.param name="paramName" description="The parameter name. If not specified, then the raw ! * content of the tag is returned." ! * @doc.param name="paramNum" description="The zero-based parameter number. It's used if the user ! * used the space-separated format for specifying parameters." */ public void ifIsGetter(String template, Properties attributes) throws XDocletException --- 801,805 ---- * @exception XDocletException Description of Exception * @doc.tag type="block" ! * @doc.param name="method" optional="true" description="The method name." */ public void ifIsGetter(String template, Properties attributes) throws XDocletException *************** *** 806,810 **** /** ! * Evaluates the body if value for the method tag equals the specified value. * * @param template The body of the block tag --- 820,824 ---- /** ! * Evaluates the body if the specified method (or current method if none is supplied) is a setter method. * * @param template The body of the block tag *************** *** 812,820 **** * @exception XDocletException Description of Exception * @doc.tag type="block" ! * @doc.param name="tagName" optional="false" description="The tag name." ! * @doc.param name="paramName" description="The parameter name. If not specified, then the raw ! * content of the tag is returned." ! * @doc.param name="paramNum" description="The zero-based parameter number. It's used if the user ! * used the space-separated format for specifying parameters." */ public void ifIsSetter(String template, Properties attributes) throws XDocletException --- 826,830 ---- * @exception XDocletException Description of Exception * @doc.tag type="block" ! * @doc.param name="method" optional="true" description="The method name." */ public void ifIsSetter(String template, Properties attributes) throws XDocletException *************** *** 834,837 **** --- 844,854 ---- } + /** + * Evaluates the body if the current method has public visibility. + * + * @param template The body of the block tag + * @exception XDocletException Description of Exception + * @doc.tag type="block" + */ public void ifIsPublic(String template) throws XDocletException { *************** *** 842,846 **** /** ! * Evaluate the body block if current method throws the excpetion specified in the exception attribute. * * @param template The body of the block tag --- 859,864 ---- /** ! * Evaluate the body block if current method throws the exceptions specified in the <code>exceptions</code> ! * attribute. * * @param template The body of the block tag *************** *** 898,902 **** /** ! * Evaluate the body block if current method doesn't throw the an excpetion specified in the exception attribute. * * @param template The body of the block tag --- 916,921 ---- /** ! * Evaluate the body block if current method doesn't throw the exceptions specified in the <code>exceptions</code> ! * attribute. * * @param template The body of the block tag *************** *** 907,911 **** * @doc.param name="method" optional="true" description="The method name whose return type is * checked. If not specified then current method is used." ! * @doc.param name="exception" optional="false" description="The exception name which is checked * for" */ --- 926,930 ---- * @doc.param name="method" optional="true" description="The method name whose return type is * checked. If not specified then current method is used." ! * @doc.param name="exceptions" optional="false" description="The exception name which is checked * for" */ *************** *** 1005,1009 **** * @param template The body of the block tag * @param attributes The attributes of the template tag ! * @param hasMethod Description of Parameter * @exception XDocletException Description of Exception * @see #ifHasMethod(java.lang.String,java.util.Properties) --- 1024,1029 ---- * @param template The body of the block tag * @param attributes The attributes of the template tag ! * @param hasMethod Flag that determines whether we're testing that the method does (true) or does not ! * (false) exist * @exception XDocletException Description of Exception * @see #ifHasMethod(java.lang.String,java.util.Properties) ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel