Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8220776

Add parameter reference tag

    XMLWordPrintable

Details

    Description

      A DESCRIPTION OF THE PROBLEM :
      It would be useful if there was a Java doc tag which allows referencing a parameter of a method or constructor in its documentation, e.g.:

      /**
       * Creates a sub string starting at {@param startIndex} (inclusive).
       *
       * @param startIndex Index at which sub string should start
       * @return sub string
       */
      String subString(int startIndex);

      ------

      This would make it easier for IDEs to refactor parameter names. With the current solution of using `{@code myParam}` this might not be possible or could be ambiguous.
      It could also make it easier to understand that a paramter is referenced when reading a doc.

      I am not sure about the HTML formatting to apply, maybe italic code would be good to differentiate it from normal code:
      {@param myParam} -> <code><i>myParam</i></code>


      Attachments

        Activity

          People

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: