Writing your own javadoc using @see?

How to use javadoc @see correctly?

My intention is to have an abstract class with abstract methods. These methods contain javadoc comments. Now, if I extend an abstract class, I redefine the methods and want to use @see .

But for all parameters, for example, for return @see link does not work. Eclipse is still complaining that the expected @return tag .

So how can I use this?

 public abstract class MyBase { protected abstract void myFunc(); } class MyImpl extends MyBase { /** * @see MyBase#myFunc() */ @Override protected void myFunc() { .. } } 
+10
java javadoc
Jun 20 2018-12-12T00:
source share
1 answer

To include documentation from the superclass, you must use {@inheritDoc} not @see .

Then you will receive superclass documents. You can add to it, and you can override things like @param and @return if you need to.

 public abstract class MyBase { /** * @param id The id that will be used for... * @param good ignored by most implementations * @return The string for id */ protected abstract String myFunc(Long id, boolean good); } class MyImpl extends MyBase { /** * {@inheritDoc} * @param good is used differently by this implementation */ @Override protected String myFunc(Long id, boolean good) { .. } } 
+10
Jan 6 '17 at 16:27
source share



All Articles