java 如何将 JavaDoc 链接到不同的类?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14932466/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 17:54:36  来源:igfitidea点击:

How to link JavaDoc to different class?

javajavadoc

提问by membersound

I'm trying to write a javadoc which displays the javadoc from another method, like:

我正在尝试编写一个 javadoc,它显示来自另一种方法的 javadoc,例如:

private List<Object> list;

/**
 * {@link list#indexOf(Object)} 
 */
int getMyIndex(Object o) {
   return list.indexOf(o);
}

This would give me a javadoc link when I use my getMyIndex()method. But what I want is that eclipse just actually shows(!) the javadoc from the method that I referenced in @link.

当我使用我的getMyIndex()方法时,这会给我一个 javadoc 链接。但我想要的是 eclipse 只是实际显示(!)来自我在@link.

Of course that's not what link is for. Link does what is should do in this case.

当然,这不是链接的用途。在这种情况下,Link 做了应该做的事情。

But what do I have to use to somehow "import" a foreign javadoc there?

但是我必须使用什么来以某种方式“导入”一个外国的 javadoc 呢?

回答by mtk

No there isn't any such tag or functionality as far as I know. Refer the javadoc tag list for more details.

不,据我所知,没有任何这样的标签或功能。有关更多详细信息,请参阅javadoc 标记列表

From the link

从链接

    Tag      |  Introduced in JDK/SDK
-----------------------------------
    @author       1.0
    {@code}       1.5
    {@docRoot}    1.3
    @deprecated   1.0
    @exception    1.0
    {@inheritDoc} 1.4
    {@link}       1.2
    {@linkplain}  1.4
    {@literal}    1.5
    @param        1.0
    @return       1.0
    @see          1.0
    @serial       1.2
    @serialData   1.2
    @serialField  1.2
    @since        1.1
    @throws       1.2
    {@value}      1.4
    @version      1.0