Javadoc链接到另一个包 [英] Javadoc Linking to Another Package

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

问题描述

我有两个套餐, Shapes Fruits

com.myproject.Shapes.
    Circle
    Square
    Triangle
com.myproject.Fruits.
    Apple
    Orange

我正在为 Apple 并且需要提供 {@ link} Square

I am writing the JavaDoc for Apple and need to provide an {@link} to Square.

我已经尝试了以下所有方法,但没有一个有效:

I have tried all of the following, and none of them work:

{@link Square}
{@link com.myproject.Square}

我是能够找到链接到以下内容的文档:(a)同一个包中的类,或(b)外部URL,但不包含另一个包中的类。

I've been able to find documentation for linking to: (a) classes within the same package, or (b) externals URLs, but not classes in another package.

任何想法是什么应该是正确的语法?谢谢!

Any ideas what the correct syntax should be? Thanks!

推荐答案

正确的语法变种

{@link [<package>.]<class>[#<method>]}
{@link #<method>}

您错过了一个完整的包裹。以下示例应该是正确的

You were missing a complete package. The following example should be correct

{@link com.myproject.Shapes.Square} 
                     ^^^^^^

这篇关于Javadoc链接到另一个包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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