[dbdoclet] Bugfix for 0.64.2: return type dimension in strict style synopsis
- From: <Jere.Kapyaho@xxxxxxxxx>
- To: <dbdoclet@xxxxxxxxxxxxx>
- Date: Mon, 19 Sep 2005 13:22:12 +0300
Hi,
I noticed what I think is a bug in dbdoclet 0.64.2, and I have a
proposed fix.
The dimensions of a method's return type does not appear in the output
when using the strict style, i.e. int[] appears as int. The problem is
in the class StrictSynopsis, in the method addStrictFields.
Inside the for loop, replace the line:
synopsis.appendChild(new Type(fields[i].type().typeName()));
With the lines:
String currentPackage = doc.containingPackage().name();
String fullType = fields[i].type().qualifiedTypeName();
String dim = fields[i].type().dimension();
String typeText = fullType;
if (fullType.startsWith(currentPackage)) {
typeText = fields[i].type().typeName();
}
synopsis.appendChild(new Type(typeText + dim));
This also adds the feature that types in the current package have a
short name, and others have a fully qualified name.
--Jere
Other related posts:
- » [dbdoclet] Bugfix for 0.64.2: return type dimension in strict style synopsis