jvmusin
03/28/2021, 11:46 AM@param
and @return
statements from documentation wherever it's possible and mention them explicitly in the description. Do you agree with it and do you really try to omit them or you still use a javadoc-like documentation?asad.awadia
03/28/2021, 2:19 PMjvmusin
03/28/2021, 2:22 PMasad.awadia
03/28/2021, 2:22 PMasad.awadia
03/28/2021, 2:23 PMjvmusin
03/28/2021, 2:24 PMasad.awadia
03/28/2021, 2:25 PMjvmusin
03/28/2021, 2:25 PMjvmusin
03/28/2021, 2:30 PMCLOVIS
03/28/2021, 2:32 PMasad.awadia
03/28/2021, 2:33 PMasad.awadia
03/28/2021, 2:33 PMnanodeath
03/28/2021, 2:40 PM/**
* Returns a list of all the foos that bar.
* @return a new read-only list of [Foo].
*/
at least, so long as it's not obvious from the method signature. like implementation details (e.g. ordering) that you want as a part of the method contract.adk
03/28/2021, 3:25 PM/**
* Returns a new read-only list of all the [Foo]s
* that bar.
*/
I'm sure different people have a personal preference for one or the other, but if you are collaborating with other developers, it is best to a) be consistent and b) avoid bike-shedding.nanodeath
03/28/2021, 3:49 PMjvmusin
03/28/2021, 4:25 PM@return
, but only when the function does something and not just retrieving/mapping elements. In those situations they write Returns x if something or y otherwise
without any @return
or @param
. Thank you)turansky
03/28/2021, 5:04 PMI just don’t feel very comfortable with IDEA’s behaviour.It main reason why I use
@param
and @return
. IDEA has more readable/organized popup in this case.turansky
03/28/2021, 5:06 PM@param
allows to see information for specific parameter. It’s very useful when method/constructor have many parameters.jvmusin
03/28/2021, 5:31 PMlouiscad
03/28/2021, 5:51 PM@property
so it's shown in the doc of that property.turansky
03/28/2021, 6:11 PMturansky
03/28/2021, 6:12 PM@param
turansky
03/28/2021, 6:13 PM@param
turansky
03/28/2021, 6:14 PMjvmusin
03/28/2021, 7:06 PMjvmusin
03/28/2021, 7:11 PM@constructor
at the end with all other @-starting things. At least, KDoc-er generates @constructor
at the end