problem referencing to methods with generic type parameters

Assuming I have an interface like to following:

public interface Test <T> {

void test ( T arg0 );

void test ( T arg0, Object arg1 );

}

I would like to reference to both "test"-methods using "{@link #test(T)}" and "{@link #test(T,Object)}".But this generates an error telling me "test(T)" and "test(T,Object)" cannot be found.

Changing T to Object in the documentation works and has as interesing effect. The generated link text is "test(Object)" but the generated link is "test(T)".

Am I somehow wrong? Or is this a known issue? And is there a workaround other than using "Object" instead of "T"?

[651 byte] By [ctron@dentrassi.dea] at [2007-10-2 20:07:21]
# 1

Hi,

I bumped into the same problem when documenting a generic.

After quite a while of search your posting led me to the solution.

My code goes something like this:

public class SomeIterator<E> implements Iterator<E> {

// ...

public SomeIterator(E[] structToIterate) {

// ...

}

// ...

}

When I tried to use @see

or @link

with the constructor Javadoc never found it.

After I changed the documentation code to

@see #SomeIterator(Object[])

it worked.

Since both taglets offer the use of a label, one can easily use these to produce comments that look correct:

@see #SomeIterator(Object[]) SomeIterator(E[])

CU

Froestel

Froestela at 2007-7-13 22:47:42 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...