Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

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;
	}
 }
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZjavaQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX