Categories: Java | Tools
This page was last modified 01:50, 4 July 2008.
JavaDoc
From Forum Nokia Wiki
JavaDoc The JavadocTM tool parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing (by default) the public and protected classes, nested classes , interfaces, constructors, methods, and fields. You can use it to generate the API (Application Programming Interface) documentation or the implementation documentation for a set of source files.
SYNOPSIS
javadoc [ options ] [ packagenames ] [ sourcefilenames ] [ -subpackages pkg1:pkg2:... ] [ @argfiles ]
Arguments can be in any order.
options - Command-line options
packagenames - A series of names of packages, separated by spaces, such as java.lang java.lang.reflect java.awt.
use -subpackages for recursion. The Javadoc tool uses -sourcepath to look for these package names.
sourcefilenames - A series of source file names, separated by spaces, each of which can begin with a path and contain a wildcard such as asterisk (*).
Class and Interface Documentation Tags
@see
@since
@deprecated
@serial
@author
@version
{@link}
{@linkplain}
{@docRoot}
An example of a class comment:
/**
* A class representing a window on the screen.
* For example:
*
* @author Senthil
* @version 1.0
* @see java.awt.BaseWindow
* @see java.awt.Button
*/
class Window extends BaseWindow {
...
}
Field Documentation Tags The following are the tags that can appear in the documentation comment for a field.
Field Tags
@see @since @deprecated @serial @serialField
An example of a field comment:
/**
* The z-coordinate of the component.
*
* @see #getLocation()
*/
int z = 1732;
Method/Constructor Tags
@see
@since
@deprecated
@param
@return
@throws and @exception
@serialData
{@link}
{@linkplain}
{@inheritDoc}
{@docRoot}
Example
/**
* Returns an Image object that can then be painted on the screen.
* The url argument must specify an absolute {@link URL}. The name
* argument is a specifier that is relative to the url argument.
* <p>
*
* @param url an absolute URL giving the base location of the image
* @param name the location of the image, relative to the url argument
* @return the image at the specified URL
* @see Image
*/
public Image getImage(URL url, String name) {
try {
return getImage(new URL(url, name));
} catch (MalformedURLException e) {
return null;
}
}
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| J2ME Menu Separator | ianratcliffe | Mobile Java General | 3 | 2006-08-01 00:04 |
| Search bluetooth by friendly name | Rama1962 | Mobile Java Networking & Messaging & Security | 1 | 2008-02-19 11:04 |
| CMD_CANCEL cannot be resolved in Eclipse & S40 SDK | comopasta | Mobile Java Tools & SDKs | 4 | 2008-02-07 14:07 |
| (HttpConnection)Connector.open(url,Connector.READ_WRITE,true) throws IOException | chrisdon2121 | Mobile Java Networking & Messaging & Security | 8 | 2006-04-30 10:10 |
| ArrayIndexOutOfBoundsException on drawPolygon method | MobileVisuals | Mobile Java Media (Graphics & Sounds) | 2 | 2006-01-10 17:33 |
