Reference value of constant with KDoc

偶尔善良 提交于 2019-12-01 07:32:36

问题


I have a object like the following in my project

object UrlUtils {

    private const val PARAM = "whatever"

    /**
     * Method that appends the [PARAM] parameter to the url
     */
    fun appendParameter(url: String) {
        // ...
    }

}

As you can see a I wanna reference the value of the PARAM field in the KDoc comment of the appendParameter method however when looking at the comment I don't see the actual value but only the name of the field.

Method that appends the PARAM parameter to the url

What I want:

Method that appends the whatever parameter to the url

In Javadoc this works by using {@value PARAM} but there seems to be nothing similar in KDoc. Even the automatic code-converter keeps the old Javadoc.

So my question: Am I missing something or is KDoc/Dokka missing this feature?


回答1:


Currently, {@value} tags are not supported by KDoc.

The closest issue requesting this is #488, so you can up-vote and/or comment on it.



来源:https://stackoverflow.com/questions/57287624/reference-value-of-constant-with-kdoc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!