How do I reference a secondary constructor in KDoc?

Viewed 257

I have a Kotlin class with a secondary constructor, that is supposed to be used in a certain scenario. Now this should be properly documented from the first constructor so you can see it right away.

/**
* This is my class.
* 
* @constructor This is the primary constructor meant for Scenario A.
* If you are in Scenario B, please use [reference to secondary constructor] <- what do I put in here?
*/
class MyClass(val a: String) {

    constructor(b: Int) : this("$b abc")

}

I have not the slightest idea what to put in the square brackets that are meant for referencing members/functions, but I feel it should be possible. Would be great if somebody knows more about this

0 Answers
Related