gpt4 book ai didi

kotlin - 使用KDoc记录变量组

转载 作者:行者123 更新时间:2023-12-02 13:20:06 24 4
gpt4 key购买 nike

所以我在伴随对象中有这组常量:

        /**
* Lists that can be associated to various media elements
*/
const val MEDIA_NAME = "Media_name"
const val SONGS_IDS = "Songs_ids"
const val GENRE_IDS = "Genres_ids"
const val ARTISTS_IDS = "Artists_ids"

当我执行dokka时,与常量相关联的注释在文档中的格式不正确...如何为多个常量使用一个描述?

最佳答案

您可以通过在代码中对元素进行分组来对kDoc中的元素进行分组:

/**
* Lists that can be associated to various media elements
*/
object Media {
const val NAME = "Media_name"
const val SONGS_IDS = "Songs_ids"
const val GENRE_IDS = "Genres_ids"
const val ARTISTS_IDS = "Artists_ids"
}

关于kotlin - 使用KDoc记录变量组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58853081/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com