aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/main/kotlin/jvmOverloads.kt
blob: d8e4f67ce9faaa0a60ce40a5efbd77ee32017a66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package org.jetbrains.dokka.kotlinAsJava

import org.jetbrains.dokka.model.Annotations
import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.model.properties.WithExtraProperties

internal fun WithExtraProperties<out Documentable>.hasJvmOverloads(): Boolean {
    return extra[Annotations]
        ?.directAnnotations
        ?.entries
        ?.any { (_, annotations) ->
            annotations.any { it.dri.packageName == "kotlin.jvm" && it.dri.classNames == "JvmOverloads" }
        } == true
}