KDoc常数的参考值 [英] Reference value of constant with KDoc
问题描述
我的项目中有一个类似于以下内容的object
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) {
// ...
}
}
如您所见,我想在appendParameter
方法的KDoc注释中引用PARAM
字段的值,但是在查看注释时,我看不到实际值,而只看到字段名称
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.
将PARAM参数附加到网址的方法
Method that appends the PARAM parameter to the url
我想要什么:
将任意参数附加到url的方法
Method that appends the whatever parameter to the url
在Javadoc中,这可以通过使用{@value PARAM}
起作用,但是在KDoc中似乎没有相似之处.甚至自动代码转换器都保留了旧的Javadoc.
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.
所以我的问题是:我缺少什么吗?还是KDoc/Dokka缺少此功能?
So my question: Am I missing something or is KDoc/Dokka missing this feature?
推荐答案
当前,KDoc不支持{@value}
标记.
Currently, {@value}
tags are not supported by KDoc.
请求此请求最接近的问题是#488 ,因此您可以投票和/或对此发表评论.
The closest issue requesting this is #488, so you can up-vote and/or comment on it.
这篇关于KDoc常数的参考值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!