GeeCON Prague 2014*
The moose likes Java in General and the fly likes JavaDoc Reader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "JavaDoc Reader" Watch "JavaDoc Reader" New topic
Author

JavaDoc Reader

Rishita Pallavi
Greenhorn

Joined: Jun 27, 2009
Posts: 7
Hi

I have a requirement to load class files/jars and then read javadoc from it.
How can this be done??

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42046
    
  64
Javadocs are generated from source files, not class files, so having the jar file is not sufficient. What's more, javadocs are generated from source code comments -which are not preserved in the class file- there's not even a theoretical way to generate them from class files.


Ping & DNS - my free Android networking tools app
Rishita Pallavi
Greenhorn

Joined: Jun 27, 2009
Posts: 7
are you sure? But we use ant scrit to generate java docs from jars. We dont give Source file as input anywhere there.
So i am sure, javadoc gets preserved in the class files.
Just wan to know if there is any exising API solving the purpose.
John de Michele
Rancher

Joined: Mar 09, 2009
Posts: 600
Rishita:

Sorry, but class files do not preserve comments. However, it is common practice (at least on open source projects, anyway) to jar up source code and/or javadocs. It sounds like that's what your ant build.xml file is doing.

John.
 
GeeCON Prague 2014
 
subject: JavaDoc Reader