tags:

views:

1430

answers:

2
+2  Q: 

javadoc @link

I wrote two methods in class Util:

public static final <T> T[] copy1(T[] source) {...}
public static final <T> T[] copy2(T[] source) {...}

Javadoc for method copy2 includes:

{@link #copy1(Object[]) copy}

and as a test includes also:

{@link Integer#highestOneBit(int) highestOneBit}

When I click the highestOneBit link it works. When I click the copy link, it doesnt work correctly, it links to the Util class?! Java version 1.5.0_16.

+1  A: 

The link to #copy1 is creating a link to the internal anchor for your method copy1(). Where else did you expect it to go?

Kelly French
To be more specific: it links to the class definition.I was expecting that it would link to the method in the class.
Gerard
I missed that part. D'oh!
Kelly French
+1  A: 

What happens when you link to copy(T[]) instead of copy(Object[])? On my machine, that works.

Hank Gay
That's it.The reason I used Object[], is because that was the code generated, when after the # sign, you try code completion (Ctrl-Space) in Eclipse.
Gerard