java.interop icon indicating copy to clipboard operation
java.interop copied to clipboard

Import Java package-level documentation

Open jonpryor opened this issue 5 years ago • 0 comments

Package-level documentation is stored in package-info.java:

package-info.java - Can contain a package declaration, package annotations, package comments and Javadoc tags.

java-source-utils.jar should read these files and emit them into /package/javadoc elements:

<api api-source="java-source-utils">
  <package jni-name="java/lang" name="java.lang">
    <javadoc>
      <![CDATA[Provides classes that are fundamental to the design of the Java              
      programming language. …]]>
    </javadoc>
    <class jni-name="Ljava/lang/Object;">
      <javadoc>
        <![CDATA[Class {@code Object} is the root of the class hierarchy…

Once java-source-utils.jar imports the package-level documentation, generator can emit mdoc(5)-style namespace documentation files:

<!-- ns-Java.Lang.xml -->
<Namespace Name="Java.Lang">
  <Docs>
    <summary>Provides classes that are fundamental to the design of the Java programming language.</summary>
    <remarks>Provides classes that are fundamental to the design of the Java programming language…</remarks>
  </Docs>
</Namespace>

This will allow importing of Java package-level documentation for display by e.g. https://docs.microsoft.com/en-us/dotnet/api/java.lang?view=xamarin-android-sdk-9

jonpryor avatar Jan 11 '21 19:01 jonpryor