Yacino
Yacino

Reputation: 665

Why eclipse doesn't recognize some javadocs tags?

I create a class A that inherit from onother class B,

I try to inherit also the javadoc of the class B to the class A.

So I use the folowing tag:

/***
 * {@inheritDoc}
 * @author 
 *
 */

But eclipse doesn't recognize this tag when I press CTRL+SPACE, and there is no doc displayed for the class A.

Any body has any idea?

Upvotes: 0

Views: 197

Answers (1)

greg-449
greg-449

Reputation: 111142

This is not valid in a class comment. You can only use it in method comments.

The Oracle Javadoc documentation on {@inheritDoc} says:

This tag is valid only in these places in a doc comment:

  • In the main description block of a method. In this case, the main description is copied from a class or interface up the hierarchy.
  • In the text arguments of the @return, @param and @throws tags of a method. In this case, the tag text is copied from the corresponding tag up the hierarchy.

Upvotes: 4

Related Questions