How do you reference a method in javadoc’s @see and @link if they have Bonded type parameters?
Example:
public class A { }
public interface I<J> { }
public class F {
public static <T extends A & I<B>, B> String newThing(T bondedTypeObject, List<B> list) {
/*...*/
}
public static <T extends A & I<B>, B> String newThing(T bondedTypeObject, B anotherObject) {
/*...*/
}
/**
* Uses {@link #newThing(T bondedTypeObject, List<B> list) newThing} to create a super new thing.
*/
public static String createSuperNewThing(...) {
return newThing(...);
}
}
How do you write the javadoc for createSuperNewThing link to the correct newThing method?
The Oracle documentation isn’t very clear in cases like this:
http://docs.oracle.com/javase/6/docs/technotes/tools/windows/javadoc.html#specifyingname
You need to specify the erasure of the arguments, for example:
Note that the erasure of a type parameter
T extends SomeClass & SomeInterfaceisSomeClass.