• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about javadoc

 
Mike Tilling
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • 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
 
Thirumurugan Mylrajan
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • 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 ]
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic