is there a good example of a source file containing Javadoc?
I can find lots of good examples of Javadoc on the internet, I would just like to find out the particular syntax used to create them, and assume I can pore through the source of some library somewhere but that seems like a lot of work.
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
I use a small set of documentation patterns:
If you are using Eclipse, then you can setup your JDK (not JRE) in Installed JREs, and then use Open Type (Ctrl + Shift + T), give something like java.util.Collections
How about the JDK source code?
Download the sources of Lucene and see how they do it. They have good JavaDocs.
If you install a JDK and choose to install sources too, the src.zip contains the source of ALL the public Java classes. Most of these have pretty good javadoc.
If all your looking for is the syntax, then this may help:
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.
The documentation of Google Guava's EventBus package and classes is a good example of Javadoc. Especially the package documentation with the quick start is well written.
Source: Stackoverflow.com