Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
This repository was archived by the owner on Aug 27, 2026. It is now read-only.

generator should pull parameter names from Javadoc #767

Closed
dotnet/android
#5468

Description

@jonpryor

Related? PR #687.

Parameter names remains an ongoing concern. "Best" is if the Java code is built with javac -parameters, which allows class-parse to extract parameter names, and everything is good.

Unfortunately, that still appears to be a rarity in the Java world.

Lacking javac -parameters, how should bindings get decent parameter names? A "reasonable" answer is to integrate @(JavaSourceJar) support, which with PR #687 and dotnet/android#5253 will parse @(JavaSourceJar) with java-source-utils.jar (69e1b80) to extract Javadoc and parameter names.

However, PR #687 is focused on parsing the Javadoc comments and translating them into C# XML Documentation Comments.

We should also look into using generator --with-javadoc-xml=FILE to determine parameter names as well.

Then there's the "priority" question: I think it would be most "sensible" and documentable if the last "source of truth" for parameter names was used in the bindings:

  1. class-parse output.
  2. java-source-utils.jar output
  3. Metadata.xml updates

This would allow Metadata.xml to always override.

Activity

  1. added
    enhancementProposed change to current functionality
    generatorIssues binding a Java library (generator, class-parse, etc.)
    on Dec 18, 2020
  2. jonpryor commented on Jan 5, 2021

    @jonpryor
    ContributorAuthor

    On further consideration, I don't think this requires any changes to generator.

    Instead, we should update the _ExportJarToXml target so that the output of java-source-utils.jar is provided to ClassParse.DocumentationPaths. This will cause java-source-utils.jar output to be treated identically to Javadoc HTML input files regarding parameter names.

  3. locked and limited conversation to collaborators on Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementProposed change to current functionalitygeneratorIssues binding a Java library (generator, class-parse, etc.)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions