• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • AurigaDoclet
  • Bugs

values of static final fields not generated

Status: Beta
Brought to you by: khurshid
  • Summary
  • Files
  • Reviews
  • Support
  • Tickets ▾
    • Bugs
    • Patches
    • Feature Requests
  • News
  • Discussion
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

  • v1.0_(example)

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#6 values of static final fields not generated

open
nobody
None
5
2005-11-08
2005-11-08
Anonymous
No

The values of static final fields are not generated.

A patch for this:

in xml2fo.xsl:

replace
<fo:inline font-weight="bold"><xsl:value-of
select="concat(' ', @name)" /></fo:inline>
</fo:block>
<!-- field comments -->

by

<fo:inline font-weight="bold"><xsl:value-of
select="concat(' ', @name)" /></fo:inline>
<xsl:if test="@value and @primitive = 'true' and @final
= 'true'">
<xsl:value-of select="concat(' = ', @value)" />
</xsl:if>
</fo:block>
<!-- field comments -->

and in XMLGenerator.java

add attribute and method:

private static String[] primitiveTypes =
{ "boolean", "char", "byte", "short", "int", "long", "float", "
double", "void"};

private static boolean isPrimitive(String type) {
int i = type.indexOf('[');
if (i>=0) {
type = type.substring
(0,i);
}
for (i = 0; i <
primitiveTypes.length; i++) {
if (primitiveTypes
[i].equals(type)) return true;
}
return false;
}

in method buildFieldList

replace

xmlTree.append(fieldDoc.isVolatile());
xmlTree.append("\" ");

by

xmlTree.append(fieldDoc.isVolatile());
xmlTree.append("\" value=\"");
xmlTree.append(fieldDoc.constantValueExpression());
xmlTree.append("\" primitive=\"");
xmlTree.append(isPrimitive(fieldDoc.type
().qualifiedTypeName()));
xmlTree.append("\" ");

(rian.wouters@philips.com)

Discussion

  • Nobody/Anonymous

    Nobody/Anonymous - 2005-11-08
     
    XMLGenerator.java
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:

Log in to post a comment.

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2026 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
Retool Logo
MongoDB Logo MongoDB