These are guidelines related to the development of Confluence. The guidelines mainly apply to Atlassian employees, but reading them should provide insight for third-party plugin developers as well, so we decided to make them public.
New Standard
Much of the Confluence codebase does not yet conform to this standard. Confluence developers should help the Confluence codebase out by bringing any code they touch into line with this standard
You really, really should read the Sun guide to writing Doc comments: http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html, especially the advice about avoiding phrases like "This class.." or "This method..."
A trivial corollary to the above rule: all methods declared in an interface must have doc comments.
@param
tags for each parameter, even if the content is trivial@returns
tag for the return value, even if trivial@throws
tags for all declared exceptions, describing the circumstances they are thrown@throws
tags for any likely undeclared exceptions@since
tag for any interface, or interface method@see
tags for other classes or methods that interact with the thing being documented in interesting ways, or for other ways to get the same informationTip
If you say something in the doc comment, you should have a test that proves it's true.
@author
tag@version
tag...would be nice, but every time I've attempted to add them, I've come up against how badly our packages are structured. I'd say not to bother right now.
So we don't keep stale methods around forever, we should always document when a method was deprecated. For example:
1 2/** @deprecated since 2.3 use {@link Space#isValidSpaceKey} */ boolean isValidSpaceKey(String key);
For more information on commenting deprecated methods, see the Deprecation Guidelines
Rate this page: