/** {@value Constants#KEY_MEAN} blah
* {@value Constants#KEY_STDDEV}
* @return A JSONObject with keys for mean and standardDeviation
*/
When I use this javadoc outside Constants.java but inside the same package, eclipse will just output the plain text, and when generating Javadoc, nothing gets displayed. Is this at all possible?
Javadoc provides the @link inline tag for referencing the members in the Java classes. We can think of the @link tag as similar to the anchor tag in HTML, which is used to link one page to another via hyperlinks.
Using Tags. For example, most Javadoc comments for methods include " @param " and " @return " tags when applicable, to describe the method's parameters and return value. The " @param " tag should be followed by the parameter's name, and then a description of that parameter.
Doc comments for constructorsIt's a best practice to include a constructor in a class. However, if the constructor is omitted, Javadoc automatically creates a constructor in the Javadoc but omits any description of the constructor.
Best start with the obvious. The referenced fields are static
as well as not private
, correct? e.g.,
public static final KEY_MEAN = 1337;
I've been working on figuring out my own similar javadoc questions today and pasting your code into my own, but changing to my class and field names, it worked as expected, "50000 blahaa 50000 Returns: A JSONObject with keys for mean and standardDeviation." This leads me to the question of verifying your field declaration in class Constants
as a reasonable first measure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With