Wednesday, February 20, 2008

Needs to Create a JavaDoc

The Javadoc tool can generate output originating from four different types of "source" files:
1. Source code files for Java classes (.java) - these contain class, interface, field, constructor and method comments.
2. Package comment files - these contain package comments
3. Overview comment files - these contain comments about the set of packages
4. Miscellaneous unprocessed files - these include images, sample source code, class files, applets, HTML files, and whatever else you might want to reference from the previous files.

/**
* Returns an Image object that can then be painted on the screen.
* The url argument must specify an absolute . The name
* argument is a specifier that is relative to the url argument.
* This method always returns immediately, whether or not the
* image exists. When this applet attempts to draw the image on
* the screen, the data will be loaded. The graphics primitives
* that draw the image will incrementally paint on the screen.
* url an absolute URL giving the base location of the image
* name the location of the image, relative to the url argument
* the image at the specified URL
* Image
*/

public Image getImage(URL url, String name) {
try {
return getImage(new URL(url, name));
} catch (MalformedURLException e) {
return null;
}
}
After running the Javadoc tool:


getImage
public Image getImage(URL url, String )
Returns an object that can then be painted on the screen. The argument must specify an absolute . The argument is a specifier that is relative to the argument.
This method always returns immediately, whether or not the image exists. When this applet attempts to draw the image on the screen, the data will be loaded. The graphics primitives that draw the image will incrementally paint on the screen.

Parameters:
- an absolute URL giving the base location of the image
- the location of the image, relative to the argument

Returns:
the image at the specified URL

No comments: