I know that there is @inheritDoc
, but it's only for methods which override others.
I have several classes with many delegate methods (which do not override others).
Can their Javadoc be "inherited" (more exactly: copied)?
/** here I need the copy of wrappedMethod's Javadoc */ public void delegateMethod(Object param){ innerSomething.wrappedMethod(param); }
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. Similar to the anchor tag, the path_to_member is the destination, and the label is the display text.
In Eclipse, go to File > Export. Expand Java and select Javadoc. Then click Next. Select your project and package.
Generally, the first sentence of Javadoc should give a brief description of the class/method/field. Then the full description should follow. And if you want to include any notes, a specialized paragraph with a "Note:" prepended should suffice. Generally if you open (xml-)tags you should close them somewhere.
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.
A @link or @see tag would be appropriate here. If you're wrapping the method, it must provide distinctive behavior which makes it unsuitable for overloading or otherwise.
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