User: ara_e_w Date: 02/09/18 12:49:15 Modified: core/src/xdoclet/tagshandler ClassTagsHandler.java MethodTagsHandler.java ParameterTagsHandler.java Log: - everything is full qualified now, importedList removed from xdt files and marked deprecated - removed system.out from catormapping handler ** make sure any type you generate is a full qualified class ** Revision Changes Path 1.11 +3 -2 xdoclet/core/src/xdoclet/tagshandler/ClassTagsHandler.java Index: ClassTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/ClassTagsHandler.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- ClassTagsHandler.java 9 Sep 2002 04:30:37 -0000 1.10 +++ ClassTagsHandler.java 18 Sep 2002 19:49:15 -0000 1.11 @@ -18,10 +18,10 @@ import xdoclet.util.TypeConversionUtil; /** - * @author Ara Abrahamian ([EMAIL PROTECTED]) + * @author Ara Abrahamian ([EMAIL PROTECTED]) * @created Oct 14, 2001 * @xdoclet.taghandler namespace="Class" - * @version $Revision: 1.10 $ + * @version $Revision: 1.11 $ */ public class ClassTagsHandler extends AbstractProgramElementTagsHandler { @@ -706,6 +706,7 @@ * @param attributes * @return Description of the Returned Value * @exception XDocletException Description of Exception + * @deprecated Make sure the template file uses full qualified class names everywhere instead. * @doc.tag type="block" */ public String importedList(Properties attributes) throws XDocletException 1.21 +3 -16 xdoclet/core/src/xdoclet/tagshandler/MethodTagsHandler.java Index: MethodTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/MethodTagsHandler.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -w -r1.20 -r1.21 --- MethodTagsHandler.java 9 Sep 2002 04:30:37 -0000 1.20 +++ MethodTagsHandler.java 18 Sep 2002 19:49:15 -0000 1.21 @@ -23,26 +23,13 @@ * @author Ara Abrahamian ([EMAIL PROTECTED]) * @created Oct 15, 2001 * @xdoclet.taghandler namespace="Method" - * @version $Revision: 1.20 $ + * @version $Revision: 1.21 $ */ public class MethodTagsHandler extends AbstractProgramElementTagsHandler { public static String getMethodTypeFor(XMethod method) { - return getMethodTypeFor(method, false); - } - - public static String getMethodTypeFor(XMethod method, boolean full_qualified) - { - boolean should_be_in_full_qualified_format = full_qualified == true || method.isReturnTypeDefinedInFullQualifiedFormat() == true || (DocletContext.getInstance().getActiveSubTask() instanceof XmlSubTask); - String return_type = should_be_in_full_qualified_format ? method.getReturnType().getQualifiedName() : method.getReturnType().getName(); - - //TODO: do more check here: if it's imported->not in full qualified format, - //if not imported & full_qualified=false->dangerous to rip off the full package name if the return type is in - //the same package and user normally didn't have to import or fully qualify if (they are in the same package). - //So we should find a way to fully qualify it if it's in another package! - - return return_type + method.getReturnDimensionAsString(); + return method.getReturnType().getQualifiedName() + method.getReturnDimensionAsString(); } /** @@ -672,7 +659,7 @@ { boolean full_qualified_format = TypeConversionUtil.stringToBoolean(attributes.getProperty("fullQualifiedFormat"), false); - return getMethodTypeFor(getCurrentMethod(), full_qualified_format); + return getMethodTypeFor(getCurrentMethod()); } public void ifIsOfType(String template, Properties attributes) throws XDocletException 1.15 +5 -22 xdoclet/core/src/xdoclet/tagshandler/ParameterTagsHandler.java Index: ParameterTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tagshandler/ParameterTagsHandler.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -r1.14 -r1.15 --- ParameterTagsHandler.java 10 Sep 2002 09:53:49 -0000 1.14 +++ ParameterTagsHandler.java 18 Sep 2002 19:49:15 -0000 1.15 @@ -4,23 +4,19 @@ */ package xdoclet.tagshandler; -import java.util.*; - +import java.util.Collection; import java.util.Properties; import java.util.StringTokenizer; - import xjavadoc.*; -import xdoclet.DocletContext; import xdoclet.XDocletException; -import xdoclet.XmlSubTask; import xdoclet.util.TypeConversionUtil; /** * @author Ara Abrahamian ([EMAIL PROTECTED]) * @created Oct 15, 2001 * @xdoclet.taghandler namespace="Parameter" - * @version $Revision: 1.14 $ + * @version $Revision: 1.15 $ */ public class ParameterTagsHandler extends AbstractProgramElementTagsHandler { @@ -41,15 +37,7 @@ public static String getMethodParamTypeFor(XParameter param) { - return getMethodParamTypeFor(param, false); - } - - public static String getMethodParamTypeFor(XParameter param, boolean fullyQualified) - { - boolean FQCN = fullyQualified == true || param.isTypeDefinedInFullQualifiedFormat() == true || (DocletContext.getInstance().getActiveSubTask() instanceof XmlSubTask); - String returnType = FQCN ? param.getType().getQualifiedName() : param.getType().getName(); - - return returnType + param.getDimensionAsString(); + return param.getType().getQualifiedName() + param.getDimensionAsString(); } /** @@ -63,9 +51,7 @@ */ public String methodParamType(Properties attributes) throws XDocletException { - boolean fullyQualified = TypeConversionUtil.stringToBoolean(attributes.getProperty("fullQualifiedFormat"), false); - - return getMethodParamTypeFor(currentMethodParameter, fullyQualified); + return getMethodParamTypeFor(currentMethodParameter); } /** @@ -162,14 +148,11 @@ * then include the parameter type of parameters in the composed string." * @doc.param name="forConstructor" optional="true" values="true,false" description="If true, then * look for parameters of current constructor instead of current method" - * @doc.param name="fullQualifiedFormat" optional="true" value="true,false" description="If true, - * then include the method name as FQCN (fully qualified class name)" */ public String parameterList(Properties attributes) throws XDocletException { boolean incl = TypeConversionUtil.stringToBoolean(attributes.getProperty("includeDefinition"), true); boolean constr = TypeConversionUtil.stringToBoolean(attributes.getProperty("forConstructor"), false); - boolean fullyQualified = TypeConversionUtil.stringToBoolean(attributes.getProperty("fullQualifiedFormat"), true); Collection parameters; @@ -189,7 +172,7 @@ for (ParameterIterator i = XCollections.parameterIterator(parameters); i.hasNext(); ) { XParameter parameter = i.next(); - type = getMethodParamTypeFor(parameter, fullyQualified); + type = getMethodParamTypeFor(parameter); name = parameter.getName(); if (type == null) {
------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel