Quantcast
Channel: User Filip Milovanović - Software Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 164

Comment by Filip Milovanović on Documenting properties

$
0
0
You document the getter and the setter for the clients of your class. You document the private field for the maintainers of the class who care about the internals. One option is not to use javadoc for the latter. You state what is conceptually relevant or otherwise non-obvious, as appropriate in each context - if there is something to say. E.g., maybe the getter returns a copy of the underlying field. Don't just restate in English what any dev can understand from code; as in, don't write "Gets an instance of MyFoo" for MyFoo getFoo(). That's just busywork and noise; better to write nothing.

Viewing all articles
Browse latest Browse all 164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>