我们应该如何在Javadoc中指定外部文件,还有没有办法在XML编辑器中显示/链接这些条目?
这是我到目前为止所拥有的:
@see
的非Java文件的“外部”链接TestClass.java:
package org.test;
/**
* JavaDoc for TestClass, referencings some stuff:<br />
* <ul>
* <li>{@link org.test.TestClass#testMethod}</li>
* <li>{@link org.test.TestClass}</li>
* <li>{@link org.test}</li>
* <li>{@link resources#TestXML}<br/>
* --> every other way of writing leads to "cannot be resolved to a type"</li>
* <li>{@link resources#TestProp}</li>
* <li>{@link resources#TestNotThere}</li>
* <li>direct link without annotation: <a href="../../resources/TestProp.properties">property again </a></li>
* </ul>
* @see <a href="../../resources/TestProp.properties">property link</a>
*/
public class TestClass {
/** JavaDoc for testMethod */
public void testMethod() {
// some method implementation
}
}
源文件夹中的示例布局:
org.test
->package-info.java
->TestClass.java
resources
->TestProp.properties
->TestXML.xml
TestXML.xml:
<?xml version="1.0" encoding="UTF-8"?>
<testroot>
<testmethod name="org.test.TestClass#testMethod" />
<testclass name="org.test.TestClass" />
<testpackage name="org.test" />
<testproperty name="resources#TestProp" />
<testproperty name="TestProp" />
<testproperty name="TestProp.properties" />
<testxml name="resources#TestXML" />
<testxml name="TestXML" />
<testxml name="TestXML.xml" />
</testroot>
问题: