Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

good example of Javadoc [closed]

Tags:

java

javadoc

How about the JDK source code, but accessed through a 3rd party like docjar? For example, the Collections source.

That way, there's no big download.


The page How to Write Doc Coments for the Javadoc Tool contains a good number of good examples. One section is called Examples of Doc Comments and contains quite a few usages.

Also, the Javadoc FAQ contains some more examples to illustrate the answers.


How about the JDK source code?


I use a small set of documentation patterns:

  • always documenting about thread-safety
  • always documenting immutability
  • javadoc with examples (like Formatter)
  • @Deprecation with WHY and HOW to replace the annotated element

Have a look at Spring framework source, it has excellent javadocs


ANT for example - source code browsable online: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/DefaultLogger.java?view=co

To choose other files start from: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/?pathrev=761528