Gio
Gio

Reputation: 3340

Indicating a method argument in java doxygen comment

I'm investigating if there is a way to indicate in the doxygen comment of a java method, that you are referring to a method argument. Basically I've found <h> or @a h or @p h to indicate that h is a method argument (see examples below). Is there any difference / recommended way to indicate a method argument?

/**
 * Set height to @a h
 */
function setHeight(int h) {
    this.height = h;
}

/**
 * Set height to <h>
 */
function setHeight(int h) {
    this.height = h;
}

/**
 * Set height to @p h
 */
function setHeight(int h) {
    this.height = h;
}

Upvotes: 0

Views: 127

Answers (1)

doxygen
doxygen

Reputation: 14879

Both @a and @p will do the trick nicely and are equivalent. <h> is not something doxygen supports.

Upvotes: 1

Related Questions