如何在javadoc中引用方法? [英] How to reference a method in javadoc?

查看:1819
本文介绍了如何在javadoc中引用方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 @link 标记链接到方法?

How can I use the @link tag to link to a method?

我想要更改

/**
 * Returns the Baz object owned by the Bar object owned by Foo owned by this.
 * A convenience method, equivalent to getFoo().getBar().getBaz()
 * @return baz
 */
public Baz fooBarBaz()

/**
 * Returns the Baz object owned by the Bar object owned by Foo owned by this.
 * A convenience method, equivalent to {@link getFoo()}.{@link getBar()}.{@link getBaz()}
 * @return baz
 */
public Baz fooBarBaz()

但我不知道如何格式化 @link 标记正确。

but I don't know how to format the @link tag correctly.

推荐答案

您可以在 JavaDoc工具参考页面,包括有关<的信息/ p>

You will find much information about JavaDoc at the JavaDoc Tool reference page, including the information on the


{@ link package.class#member label}

标签(您正在寻找):


例如,这里有一条评论引用getComponentAt(int,int)方法:

For example, here is a comment that refers to the getComponentAt(int, int) method:

使用{@link #getComponentAt(int,int) )getComponentAt}方法。






其他有用的链接JavaDoc是:


Other useful links about JavaDoc are:

  • JavaDoc Technology
  • How to Write Doc Comments for the Javadoc Tool

这篇关于如何在javadoc中引用方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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