禁用 JavaDocs 的注释 [英] Annotation to disable JavaDocs

查看:21
本文介绍了禁用 JavaDocs 的注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有注释声明某个方法即使是公开的也不会包含在 JavaDocs 中?

Is there an annotation to declare that a certain method will not be included in the JavaDocs even though it is public?

类似于:

@nojavadocs
public void foo(){
//...
}

<小时>

附言我理解这里关于 API 的观点,但这些方法只是不受支持".它们可以工作(并且必须公开以便从其他包访问),但是我们不想费心记录它们并回答有关在它们的功能与支持的使用场景不相关时如何使用它们的问题.好的设计可能意味着将它们移动到另一个类,但它们在逻辑上引用了类中的数据.


P.S. I understand the point here about API, but the methods are simply "unsupported." They work (and must be public for access from other packages), but we do not want to bother documenting them and answering questions about how to use them when their functionality is not relevant to supported usage scenarios. Good design might mean moving them to another class, but they logically refer to the data in the class.

推荐答案

如果您使用的是 Sun 的 JavaDocs 工具,则不会.

Not if you're using Sun's JavaDocs tool.

他们有功能请求,但它已经在自 1997 年以来的低优先级.

They have a feature request for it, but it's been in low priority since 1997.

您可以编写自定义 doclet 来解决这个问题,也可以使用第三方工具(DocFlex 等).

You can write a custom doclet to overcome this, or use a 3rd-party tool (DocFlex or such).

这篇关于禁用 JavaDocs 的注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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