【问题标题】:Comments on @Override methods对@Override 方法的评论
【发布时间】:2011-09-09 01:54:27
【问题描述】:

我的问题并不是真正的编程问题..

我必须为 JavaDoc 注释我的代码,但我认为重新注释现有方法有点奇怪(我想到了 @Override 方法)。

比如我重写了方法onListItemClick,有没有办法将用户“重定向”到被重写方法的评论?

【问题讨论】:

    标签: android comments overriding javadoc


    【解决方案1】:

    试试{@inheritDoc} 属性。这应该可以满足您的需要。

    您还可以在此标记之后或之前添加一些额外的帮助 cmets。这是一个来自android源代码的例子:

    /**
     * {@inheritDoc}
     *
     * Note that if you're calling on a local binder, this always returns true
     * because your process is alive if you're calling it.
     */
    public boolean isBinderAlive() {
        return true;
    }
    

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 2011-11-21
      • 2018-07-04
      • 1970-01-01
      • 2013-07-10
      • 1970-01-01
      • 2012-11-21
      • 2011-05-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多