Skip to content

Import Java package-level documentation #776

@jonpryor

Description

@jonpryor

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

Metadata

Metadata

Assignees

Labels

javadocIssues with consuming Java documentation formats

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions