• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaDoc Reader

 
Rishita Pallavi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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

 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rishita Pallavi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 600
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic