本文介绍了Javadoc @see或{@link}?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人能告诉我javadoc @see
和 {@ link}
之间的区别?
Could someone tell me the difference between javadoc @see
and {@link}
?
或者更确切地说,何时使用它们中的哪一个?
Or rather, when to use which of them?
推荐答案
关于此的非常清楚。
功能差异为:
-
{@ link}
是一个内联链接,可以放在任何你喜欢的地方 -
@see
创建自己的部分
{@link}
is an inline link and can be placed wherever you like@see
creates its own section
在我看来, {@ link}
最好用在字面上在描述中使用类,字段,构造函数或方法名称。用户可以点击你链接的javadoc。
In my opinion, {@link}
is best used when you literally use a class, field, constructor or method name in your description. The user will be able to click through to the javadoc of what you've linked.
我使用 @see
注释2例:
- 某些内容非常相关,但未在说明中提及。
- 我在描述中多次引用相同的东西,它被用作替换相同的多个链接。
I基于这个意见,随机检查标准库中各种各样的文档。
I based this opinion on randomly checking out documentation for a great variety of things in the standard library.
这篇关于Javadoc @see或{@link}?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!