Should I use a “non-Javadoc” comment?

前端 未结 2 1631
清歌不尽
清歌不尽 2021-02-18 18:27

I implemented my own method defined in an interface. However when I try to add Javadoc to this method Eclipse gave me a comment like this:

/* (non-Javadoc)
 * @s         


        
2条回答
  •  悲&欢浪女
    2021-02-18 19:08

    The idea of adding a non-javadoc comment here is that in the generated javadoc the comment from the inherited method will be copied, which might be enough - and better than if you had an empty /** */ comment. At the same time, you can use the link in the source code to look up the method. And as said by Ken, you can always change it.

    If you want to include the interface's documentation, use {@inheritDoc} in your comment.

提交回复
热议问题