diff options
author | Valentin Rocher <valentin.rocher@webedia-group.com> | 2021-02-04 12:35:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 12:35:38 +0100 |
commit | b44e41ec8e3e26c73affaaa98bbd170fde352d96 (patch) | |
tree | d132becfda97d6bbc104418c48411d153c84d177 /plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt | |
parent | 47682aee8b32f9e01940e962978cc2c6c7f38e86 (diff) | |
download | dokka-b44e41ec8e3e26c73affaaa98bbd170fde352d96.tar.gz dokka-b44e41ec8e3e26c73affaaa98bbd170fde352d96.tar.bz2 dokka-b44e41ec8e3e26c73affaaa98bbd170fde352d96.zip |
add detection of JvmSynthetic (#1718)
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt')
-rw-r--r-- | plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt b/plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt new file mode 100644 index 00000000..e866ec8b --- /dev/null +++ b/plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt @@ -0,0 +1,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>.hasJvmSynthetic(): Boolean { + return extra[Annotations] + ?.directAnnotations + ?.entries + ?.any { (_, annotations) -> + annotations.any { it.dri.packageName == "kotlin.jvm" && it.dri.classNames == "JvmSynthetic" } + } == true +}
\ No newline at end of file |