The following comment has been added to this issue:

     Author: Luiz-Otavio Zorzella
    Created: Sun, 2 Feb 2003 9:07 AM
       Body:
Do ***not*** apply the patch included -- it is kludgy, and only a starting point for a 
discussion (plus it solves my immediate needs).

It does work, though, in very limited circumstances (as I did not go to the trouble of 
implementing everything yet), by keeping a "_bodyBuffer", and having some of the 
methods append to it as they go on parsing. This is a bad way of doing it, I think, 
because it makes the code so much more bloated, and ugly... BTW, I'm assuming 
"MethodImpl.setXXX" calls are mixed within the parsing phase (as opposed to a later 
traversal of the generated tree) for performance reasons, so I won't even mention that 
it would be more elegant to do it that way :^>

Anyway, I think the best approach (I am volunteering to do it, btw, if that is yet 
unclear) is to have all the methods return "String" rather than "void", instead of 
adding the "_bodyBuffer.append ()" junk everywhere...

Now, you gotta tell me if: 

- adding this is of any interest to others (it is to me, though my immediate needs are 
met by the existing patch)

- it won't make the code much slower for a reason unknown to me (I don't think it will)

- you are interested in incorporating the changes to xjavadoc

- this is the right approach (i.e. changing all "void"s to "String"s)

Thanks,

Zorzella
---------------------------------------------------------------------
View the issue:

  http://opensource.atlassian.com/projects/xdoclet/secure/ViewIssue.jspa?key=XJD-15


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XJD-15
    Summary: XMethod should have a getBody
       Type: Improvement

     Status: Closed
   Priority: Minor
 Resolution: WON'T FIX

 Time Spent: Unknown
   Estimate: 0 minutes

    Project: XJavaDoc
  Component: Core

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Luiz-Otavio Zorzella

    Created: Sun, 2 Feb 2003 6:12 AM
    Updated: Sun, 2 Feb 2003 8:57 AM
Environment: All

Description:
XMethod allows to get the tags and method signatures, but not the method body itself. 
This should be added. The usefulness is described in this email of mine to the list:

***********************

getting body methods is useful when dealing with "conversion" getters and setters. For 
example, if my Bean has a method:

public Integer getTempInFahrenheit () {
    return TempUtil.c2f (getTempInCelcius ());
}

(analogously for set). I could have these methods copied "as-is" to a generated Struts 
Form Object or Value Object. This is useful for any conversion: IP (Long vs String), 
date (long vs oh-so-many other ways), measurements, etc...

Any advice to a xjavadoc-dev newbie to add a getBody to XMethod (or elsewhere)? 


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to