Javadoc when extending a generic class with a non-generic class

Suppose I have two classes:

abstract class GenericA<E> { public void go(E e) {...} } public class IntegerA extends GenericA<Integer> { } 

Note that GenericA is private and public, and IntegerA is public, not shared.

Now, when I create a public Javadoc (using Eclipse), I see the following in the IntegerA methods IntegerA :

 public void go(E e) 

The problem is that the reader of this Javadok does not know what E ; that is, E represents Integer . I would prefer Javadok to say

 public void go(Integer e) 

Is there a way to make Javadoc behave the way I want?

+6
source share
1 answer

The only way I know is to override the method in IntegerA using Integer, and then call the super method.

  @Override public void go(Integer e) { super.go(e); } 
+3
source

Source: https://habr.com/ru/post/926785/


All Articles