-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
javadocIssues with consuming Java documentation formatsIssues with consuming Java documentation formats
Description
While reviewing xamarin/android-api-docs#33, ran across the following Javadoc imports which don't look "right", involving HTTP anchors.
Consider this Javadoc fragment from java/lang/invoke/MethodHandleInfo.java
, which contains a URL with an anchor MethodHandleInfo.html#refkinds
:
public /* partial */ interface MethodHandleInfo {
/**
* Returns the descriptive name of the given reference kind,
* as defined in the <a href="MethodHandleInfo.html#refkinds">table above</a>.
* The conventional prefix "REF_" is omitted.
* @param referenceKind an integer code for a kind of reference used to access a class member
* @return a mixed-case string such as {@code "getField"}
* @exception IllegalArgumentException if the argument is not a valid
* <a href="MethodHandleInfo.html#refkinds">reference kind number</a>
*/
public static String referenceKindToString(int referenceKind) {
if (!MethodHandleNatives.refKindIsValid(referenceKind))
throw newIllegalArgumentException("invalid reference kind", referenceKind);
return MethodHandleNatives.refKindName((byte)referenceKind);
}
}
Importing the above Javadoc results in the <summary/>
:
<summary>Returns the descriptive name of the given reference kind,
as defined in the "MethodHandleInfo.</summary>
Note that <a href="MethodHandleInfo.html#refkinds">
is converted into "MethodHandleInfo
: the leading "
is preserved, while the extension .html
and anchor #refkinds
is lost.
Or consider java/lang/ClassLoader.java
:
public /* partial */ class ClassLoader {
/**
* Returns the class with the given <a href="#name">binary name</a> if this
* loader has been recorded by the Java virtual machine as an initiating
* loader of a class with that <a href="#name">binary name</a>. Otherwise
* <tt>null</tt> is returned.
*
* @param name
* The <a href="#name">binary name</a> of the class
*
* @return The <tt>Class</tt> object, or <tt>null</tt> if the class has
* not been loaded
*
* @since 1.1
*/
protected final Class<?> findLoadedClass(String name) {
ClassLoader loader;
if (this == BootClassLoader.getInstance())
loader = null;
else
loader = this;
return VMClassLoader.findLoadedClass(loader, name);
}
}
This is imported as:
<param name="name">The "#name">binary name of the class</param>
<summary>Returns the class with the given "#name">binary name if this
loader has been recorded by the Java virtual machine as an initiating
loader of a class with that "#name">binary name.</summary>
The commonality between these two issues appears to be in dealing with URL anchors, #anchor
.
Metadata
Metadata
Assignees
Labels
javadocIssues with consuming Java documentation formatsIssues with consuming Java documentation formats