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}
^^^^^^