这是因为 Javadoc 需要知道您所引用的类的确切位置才能创建指向该类的链接。只需按照上面评论中提到的方式添加包即可。
@see mypackage.MyClass#Constructor(Type1 p1, Type2 p2)
javadoc 工具将允许您采用如下快捷方式:
// For methods in the same class:
@see #Constructor(Type1 p1, Type2 p2)
// For methods in the same package:
@see MyClass#Constructor(Type1 p1, Type2 p2)
如果你的包名称很长并且想隐藏它,你可以使用标签:
@see mypackage.MyClass#Constructor(Type1 p1, Type2 p2) MyClass#Constructor(Type1 p1, Type2 p2)
上面会显示:
也可以看看: MyClass.Constructor(Type1 p1, Type2 p2)
请参阅 Oracle 文档here http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see有关@see的更多信息
Warning: If you use the code completion feature of some IDEs (E.g. Eclipse) for creating Javadoc comments it may add an import for the package you are referencing instead. While this may make your comments look cleaner by excluding the package name it is not good practice to add actual dependencies purely for documentation.