Javadoc
From Wikipedia, the free encyclopedia
Javadoc is a documentation generator from Sun Microsystems for generating API documentation in HTML format from Java source code.
Javadoc is the industry standard for documenting Java classes. Most IDEs will automatically generate Javadoc HTML.
Javadoc also provides an API for creating doclets and taglets, which allows you to analyze the structure of a Java application. This is how JDiff can generate reports of what changed between two versions of an API.
[edit] Example
An example of using Javadoc to document a method follows. Notice that spacing and quantity of characters in this example are as conventions state.
/** * Validates a chess move. Use {@link #doMove(int, int, int, int)} to move a piece. * * @param theFromFile file from which a piece is being moved * @param theFromRank rank from which a piece is being moved * @param theToFile file to which a piece is being moved * @param theToRank rank to which a piece is being moved * @return true if the chess move is valid, otherwise false */ boolean isValidMove(int theFromFile, int theFromRank, int theToFile, int theToRank) { ... } /** * Move a chess piece. * * @see java.math.RoundingMode */ boolean doMove(int theFromFile, int theFromRank, int theToFile, int theToRank) { ... }
[edit] See also
[edit] External links
- Javadoc tool web site
- JavaDoc tags and how to write comments
- JSR 260 Javadoc Tag Technology Update Java Specification Request (defines new Javadoc tags)
- Improve on Javadocs with ashkelon
- A collection of Javadoc doclets
- Javadoc By Examples
- An index to many Javadoc generated websites
- JavadocOnline: Search engine project, to get public Javadocs over Internet
- MyJavadoc: Another search engine project, to get public Javadocs over Internet, with the possibility to submit new Javadocs
- DocJar: Another search engine project, to get public Javadocs over Internet
- Globaldocs: A viewer to browse multiple Javadocs simultaneously.
- Various Java documentations converted to Windows Help format