Mandatory method documentation
Posted
by Sjoerd
on Stack Overflow
See other posts from Stack Overflow
or by Sjoerd
Published on 2010-03-16T08:09:20Z
Indexed on
2010/03/16
8:16 UTC
Read the original article
Hit count: 168
On my previous job, providing all methods with javadoc was mandatory, which resulted in things like this:
/**
* Sets the Frobber.
*
* @param frobber The frobber
*/
public setFrobber(Frobber frobber) { ... }
As you can see, the documentation adds little to the code, but takes up space and work.
Should documenting all methods be mandatory or optional? Is there a rule for which methods to document? What are pros and cons of requiring every method to be documented?
© Stack Overflow or respective owner