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

stddoclet: Allow {@value} to take field name arg and be used in any doc comment

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0, 1.4.1
    • tools
    • generic, x86
    • other, windows_2000

      Currently {@value} can only be used in the doc comment of its own field,
      to display the value. It would be useful to be able to use it anywhere.
      I am looking for a way to customize a series of Javadoc comments. Example:

      /**
       * Names the property file.
       */
      public static final String NAME_OF_PROPERTY_FILE = "db2.properties";

      /**
       * This method reads the properties out of {@value NAME_OF_PROPERTY_FILE}
       */
       public void readProperties() {
       ...
       }

      /**
       * This method writes the properties into {@value NAME_OF_PROPERTY_FILE}
       */
       public void writeProperties() {
       ...
       }

      So if I need to change the value of the constant to
      "cloudscape.properties" I wouldn't have to redo all the Javadoc
      comments. (I came to this while doing a lot of Search/Replace)!

            Unassigned Unassigned
            dkramersunw Douglas Kramer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: