Javadoc链接到其他类中的方法 [英] Javadoc link to method in other class

查看:2697
本文介绍了Javadoc链接到其他类中的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在使用这种Javadoc语法引用其他类中的方法:

Currently I'm referencing methods in other classes with this Javadoc syntax:

@see {@link com.my.package.Class#method()}

根据我从文档中理解的这是正确的方法去做这个。但现在到了有趣的部分,还是令人沮丧。当我生成这个javadoc时,我首先得到以下错误:

And in what I understand from the documentation this is the correct way to do this. But now to the funny part, or frustrating. When I generate this javadoc I first of all get following error:

warning - Tag @see:illegal character: "123" in "{@link com.my.package.Class#method()}"
warning - Tag @see:illegal character: "64" in "{@link com.my.package.Class#method()}"
warning - Tag @see: reference not found: {@link com.my.package.Class#method()}

生成的HTML代码为:

The Generated HTML code of this is:

"," <code>com.my.package.Class#method()}</code> ","

我当然没有链接。
有谁可以告诉我发生了什么,以及如何解决这个问题的任何提示?

And of course I have no link. Can anyone tell me what's happening, and any hints on how to fix this?

根据ASCII表格字符123和64代表{和@ ,根据文档,当这种语法正确时,为什么这些字符不能有效?

According to the ASCII table characters 123 and 64 for wold represent { and @, so why aren't these characters valid when this syntax is correct according to the documentation?

推荐答案

对于Javadoc标签 @see ,您不需要使用 @link ; Javadoc将为您创建一个链接。尝试

For the Javadoc tag @see, you don't need to use @link; Javadoc will create a link for you. Try

@see com.my.package.Class#method()

这里有关于 @see 的更多信息。

Here's more info about @see.

这篇关于Javadoc链接到其他类中的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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