How are primary constructor parameters supposed to be documented?
For example, there is a class:
class Foo( param0: Int, private val property0: Int, val property1: Int )
There is 1 constructor parameter, 1 private property and 1 public property. How should they be documented? I mean, what is the recommended way?
For examle, I can do something like that:
/** * Class description * * @constructor primary constructor description * @param param0 description of param0 * @param property0 description of property0 * @property property1 description of property1 **/ class Foo( param0: Int, private val property0: Int, val property1: Int )
But in this case public property is not shown in constructor documentation.
Alternatively, I can do like that:
/** * Class description * * @constructor primary constructor description * @param param0 description of param0 * @param property0 description of property0 * @param property1 description of property1 **/ class Foo( param0: Int, private val property0: Int, val property1: Int )
In this case constructor parameters are not shown in class kdoc. Instead, they are only visible in constructor kDoc.
I understand, that generally speaking this is correct, but in practice that is inconvenient.
Finally, I can remove constructor tag:
/** * Class description * * @param param0 description of param0 * @param property0 description of property0 * @param property1 description of property1 **/ class Foo( param0: Int, private val property0: Int, val property1: Int )
But in this case constructor kDoc displays generic arguments of the class (in case there are any).
I failed to find answers to these quesions in kDoc documentation.
So my question is: what is the recommended way of writing class kDoc?