JDK-4753737 : stddoclet: Allow {@value} to take field name arg and be used in any doc comment
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0,1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: other,windows_2000
  • CPU: generic,x86
  • Submitted: 2002-09-26
  • Updated: 2014-05-05
  • Resolved: 2002-12-03
Related Reports
Duplicate :  
Duplicate :  
Description
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)!

Comments
EVALUATION Sounds useful. ###@###.### 2002-09-26 Close out as a duplicate of: 4764045: javadoc inline tag {@value} should be available everywhere ###@###.### 2002-12-03
26-09-2002