Sarah Szabo
Sarah Szabo

Reputation: 10815

Javadoc Multi-Line Declaration Syntax?

If I have the variable declaration:

/**
 * The Resource folder for the program Information.
 */
public static final Path RESOURCE_FOLDER_PATH = Paths.get("", "Resources"),
/**
 * The folder holding all faction information.
 */
FACTION_FOLDER_PATH = Paths.get(RESOURCE_FOLDER_PATH.toString(), "Faction Information");

The Javadoc will not document the latter Path variable. Does Javadoc support this type of documenting style or do I have to declare them separately?

Upvotes: 1

Views: 503

Answers (1)

GingerHead
GingerHead

Reputation: 8230

No unfortunately you can't.

You need to do it in the following way which is clearer and neater:

/**
 * 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>
 * 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. 
 *
 * @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;
        }
 }

Upvotes: 1

Related Questions