Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2007-03-07T15:56:27Z by SystemAdmin
SystemAdmin
SystemAdmin
210 Posts
ACCEPTED ANSWER

Pinned topic autogenerating java doc compliant documentation in source code.

‏2007-03-04T14:13:11Z |
Hi all,

There are tons of java classes in my current project that have zero documentation at class and method level.
I tried using javadoc tool in eclipse IDE for generating java docs for these classes but was not helpful in terms of knowing the PURPOSE of the class/method.

It is being a tedious task to hand write the class/method level documentation/purpose. Thus wondering if there is any open source utility tool that intutively auto generates the java doc complaint documentation blocks within the class ALONG with the PURPOSE of the method/class by understanding the code??

Example: I want the tool to generate the following documentation block for a method in the source code as follows:
code:
-------------------------------------------------------------------------------code
[b]
/**
  • This method handles the CRUD requests.
  • @param XXX
  • @return YYY
  • @throws ZZZ
  • @see xyz.x.y.z
*/
[/b]

public void x(int z ) throws Exception;

[/code]


Any help is HIGHLY appreciated.

Thanks a ton in advance.
Updated on 2007-03-07T15:56:27Z at 2007-03-07T15:56:27Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    210 Posts
    ACCEPTED ANSWER

    Re: autogenerating java doc compliant documentation in source code.

    ‏2007-03-07T15:56:27Z  in response to SystemAdmin
    I'm doubtful there is a smart enough parser that can figure out the context of a method so as to actually document it-- i.e. figuring out that the code is creating a table in a database and therefore documenting the method as a CRUD style operation. Most tools I'm familiar with are good at JavaDoc style documenting with inputs and outputs, etc.

    Here is an idea-- rather than document all method purposes via JavaDoc, find some amount that are important to document and have a corresponding test case-- JUnit/TestNG that clearly shows the contract with the method-- that may be more helpful and lasting than a JavaDoc purpose statement. Thoughts?

    > Hi all,
    >
    > There are tons of java classes in my current project
    > that have zero documentation at class and method
    > level.
    > I tried using javadoc tool in eclipse IDE for
    > generating java docs for these classes but was not
    > helpful in terms of knowing the PURPOSE of the
    > class/method.
    >
    > It is being a tedious task to hand write the
    > class/method level documentation/purpose. Thus
    > wondering if there is any open source utility tool
    > that intutively auto generates the java doc complaint
    > documentation blocks within the class ALONG with the
    > PURPOSE of the method/class by understanding the
    > code??
    >
    > Example: I want the tool to generate the following
    > documentation block for a method in the source code
    > as follows:
    >
    >
    > code:
    >
    > -------------------------code
    > [b]
    > /**
    > * This method handles the CRUD requests.
    > * @param XXX
    > * @return YYY
    > * @throws ZZZ
    > * @see xyz.x.y.z
    > */
    > [/b]
    >
    > public void x(int z ) throws Exception;
    >
    > [/code]
    >
    >
    >
    >
    >
    > Any help is HIGHLY appreciated.
    >
    > Thanks a ton in advance.