What Is Javadoc?

Javadoc is a program shipped with JDK that you can use to run over your source code to produce documentation of your classes in the same type of HTML files that Sun Microsystems has used for its Java API documentation. To use javadoc on your source code, you have to tag your code with a certain type of comment formats. A simple example of Javadoc comments looks like this:

 /** * Class MyButton implements java.io.Serailizable,
extends java.awt.Button */ public class MyButton { /** * Does nothing interesting * * @param image the image to show on button * @param label text to show on button */ public MyButton(String label, Image image) { //code here } //rest of class here }

Javadoc comments start with /**, end with */, and, in-between, use tags such as @param, @return, and @exception to describe the workings of a method.
Extracted comments are processed into a set of HTML files for later perusal by a web browser. Using Javadoc, you can view the class hierarchy, an index of all methods and fields, and the details of each class.
The nice thing about Javadoc comments is that you can embed HTML tags to format your text. For example:

 /** * The Use Of This Class is Prohibited By Law. */ 

will make “The Use Of This Class is Prohibited By Law.” appear in bold.

For a definitive guide on javadoc conventions, look up Chapter 18 of the book “The Java Language Specification” at: http://java.sun.com/docs/books/jls/html/index.html .

If you job involves heavy documentation of Java code, look up a tool called MIMDoc at: http://www.mimsoftware.com/mimdoc.htm.
MIMDoc, a 100% java tool, is a javadoc-compatible documentation generator with many additional features, among them:

1. Full-featured category management to let you group objects by categories.
2. More HTML format options.
3. Conditional generation of object documentation, which helps you distinguish between several documentation levels or versions.
4. @code sub tag allows inclusion of sample code in you documentation.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS