• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

question about javadoc

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I documented all the classes of my project, each class is documented as follows:

/**
* class documentation
*/
public class {

/**
* member class documentation
*/
public void member (){
}
}

when I run the javadoc tool, the html files that result contain the member classes documentation, but does not show the class documentation which is at the top of each class, is this normal?

Best Regards
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mike Tilling:


/**
* class documentation
*/
public class {

/**
* member class documentation
*/

Best Regards




The one you call as class documentation is not supposed to be a javadoc comment(should be enclosed in /* */). It is supposed to contain the copyright,version number etc..

The one you mentioned as "member class documentation" should contain the javadoc comment for the class.

Refer the code convetions in http://java.sun.com/docs/codeconv/
In the last section there is an example of the code.
[ September 13, 2006: Message edited by: Thirumurugan Mylrajan ]
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is incorrect.
The second javadoc section is a method comment, not a class comment.

But as there is no classname here there's no class to comment so nothing is generated at all.

Without knowing what the actual classes look like and what javadoc options are supplied there's no telling what Mike's doing wrong, as apart from the missing class name it looks like a legal (if extremely brief) piece of javadoc.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic