如何使用KDoc记录默认参数

时间:2018-11-27 17:46:05

标签: kotlin kdoc

是否存在使用KDoc记录默认参数的语法,还是应该手动进行?

/**
 * A group of *members*.
 *
 * This class has no useful logic; it's just a documentation example.
 *
 * @property name the name of this group. Default -"NoName"
 * @constructor Creates an empty group.
 */
class Group(val name: String = "NoName") {
    /**
     * Adds a [member] (default - NoMember) to this group.
     * @return the new size of the group.
     */
    fun add(member: String = "NoMember"): Int { ... }
}

0 个答案:

没有答案