是否“/*(非 javadoc)"有一个很好理解的意思吗? [英] Does "/* (non-javadoc)" have a well-understood meaning?

查看:25
本文介绍了是否“/*(非 javadoc)"有一个很好理解的意思吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

/* (non-javadoc) 除了向源代码的读者指出注释块故意不是 Javadoc 注释之外,是否还有意义?最近我看到很多这样的代码:

Does /* (non-javadoc) have a meaning, beyond pointing out to the reader of source code that a comment block is intentionally not a Javadoc comment? Lately I've seen a lot of code that looks like this:

/*
 * (non-javadoc)
 *
 * This method converts widgets to gizmos
 */
public Foo bar() {
   ...

这是某种既定的惯例吗?如果是,它是什么意思(超出明显的字面意思)以及何时使用?

Is this an established convention of some kind? If so, what does it mean (beyond the obvious literal meaning) and when is it used?

推荐答案

根据 我能找到的信息,这是为了修复旧版本的 JavaDoc 工具(或更可能是 Eclipse 处理 JavaDoc 注释的旧版本)中的错误,该错误不会显示覆盖方法的正确文档父类的方法.

According to the info I could find, this was to fix a bug in older versions of the JavaDoc tool (or more likely older version of Eclipse's processing of JavaDoc comments) that would not display the correct documentation for a method that overrides the method of a parent class.

正如 Konstantin 所指出的,Eclipse 的覆盖模板包含此文本.

As noted by Konstantin, Eclipse's override template includes this text.

这篇关于是否“/*(非 javadoc)"有一个很好理解的意思吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆