【发布时间】:2018-09-20 11:21:54
【问题描述】:
自从我从 Java 切换到 Kotlin 后,我不得不重写我的文档。 Kotlin 有自己的文档格式,或者据我所知它扩展了普通的 javadocs。我检查了the official documentation,它声明有一个property 标签,它允许您记录类属性。
如果我的 kdoc 看起来像这样:
/**
* Tablemodel for the Players of a server, only holds two properties:
*
* * Name
* * Score
*
* @author marcel
* @since Jan 10, 2018
* @property playerName Ingame name of the player
* @property playerScore Ingame score of the player
*/
这两个属性都不是 IntelliJ 中呈现的 kdoc 的一部分。
如果我移动author 和since 上面的两个属性,它们也不会显示。我不太明白为什么。是 IntelliJ 缺乏适当的 kdoc 支持吗?
【问题讨论】:
-
playerName和playerScore是在类中声明 还是作为示例中的参数声明? -
class Player(var playerName: String, var playerScore: Int) ... 但我想@yole 的答案就足够了,以防它是正确的,我稍后会测试。
标签: java kotlin documentation javadoc