Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use a generic type parameter in a Javadoc link?

I have the following code:

/**
 * [...]
 *
 * @see #setShowOn(T, Device)
 */
 public static <T extends HasStyle> void setHideOn(T widget, Device device) {
     [...]
 }

setShowOn has the same signature as setHideOn. Javadoc complains:

Tag @see: can't find setHideOn(T, Device) in com.github.[...]

I tried different alternatives (@see #setShowOn(<T>, Device), @see #setShowOn(T extends HasStyle, Device), ...) but those didn't even work in Eclipse. (@see #setShowOn(T, Device) does.)

like image 593
Dominik Avatar asked Apr 07 '12 10:04

Dominik


1 Answers

I found the answer. This works:

@see #setHideOn(HasStyle, Device)
like image 97
Dominik Avatar answered Oct 12 '22 10:10

Dominik