CheckStyle - JavaDoc for overrided methods
For overrided methods Eclipse generate javadoc like this:
/* (non-Javadoc)
* @see com.ncube.qtp开发者_运维百科okertest.listeners.PlayerChangeListener#
* nameChanged(com.ncube.qtpokertest.events.PlayerChangeEvent)
*/
it's not a javadoc comment, actually, but it works properly. Checkstyle mark this comment as warning. How can I tune checkstyle to disable this warnings?
If I remember correct you should just use the @Override
annotation and not write/generate any documentation at all. This should avoid the checkstyle warning but nevertheless generate a JavaDoc which points to the parent JavaDoc (Specified by:).
For older Java-Versions (before 1.6):
The @Override
Annotation works only for inherited methods of super classes.
So it is better to use
/** {@inheritDoc} */
which works also for methods implementing interfaces.
Checkstyle recognizes this comment as JavaDoc and you have only one place where you describe your method.
精彩评论