Javadoc @链接到Kotlin类

时间:2018-11-07 08:59:06

标签: java kotlin javadoc

这是我的javadoc

SELECT
  ift_users.ID,
  ift_users.user_login,
  substr(ift_posts.post_title,1,length(ift_posts.post_title)-1),
  avg(ift_learndash_user_activity_meta.activity_meta_value) as score,
  ift_learndash_user_activity.activity_completed,
  ift_users.display_name
FROM ift_learndash_user_activity
  INNER JOIN ift_users
    ON ift_learndash_user_activity.user_id = ift_users.ID
  INNER JOIN ift_learndash_user_activity_meta
    ON ift_learndash_user_activity.activity_id = ift_learndash_user_activity_meta.activity_id
  INNER JOIN ift_posts
    ON ift_learndash_user_activity.post_id = ift_posts.ID
  INNER JOIN ift_usermeta
    ON ift_users.ID = ift_usermeta.user_id
WHERE ift_learndash_user_activity.activity_type = 'quiz'
AND ift_learndash_user_activity_meta.activity_meta_key = 'percentage'
AND ift_usermeta.meta_key = 'learndash_group_users_9012'
AND ift_usermeta.meta_value = 9012
group by 
  ift_users.ID,
  ift_users.user_login,
  substr(ift_posts.post_title,1,length(ift_posts.post_title)-1),
  ift_learndash_user_activity.activity_completed,
  ift_users.display_name

SubComponent={(v) => <div style={{padding: '10px'}}>Hello {v.row._index}</div>} 是Kotlin类。当我将鼠标悬停在上面带有javadoc的方法上时,弹出窗口说:

/**
 * If you wish to add this fragment to your activity, you must implement {@link com.example.app.BlaActivity BlaActivity}
 *
 * @return an instance of BlaFragment
 */

因此,它不会在弹出窗口中显示我的Kotlin类。但是,当我使用Java类时,效果很好。

Javadoc不支持Kotlin类吗?

2 个答案:

答案 0 :(得分:1)

Kotlin具有不同的链接语法。基于kotlinlang.org

代替

{@link com.example.app.BlaActivity#BlaActivity}

像这样使用[

[com.example.app.BlaActivity.BlaActivity]

答案 1 :(得分:-2)

在我的项目中运行正常,请尝试将您的Kotlin版本和插件更新为最新版本,因为我的版本都是最新的。