From b44e41ec8e3e26c73affaaa98bbd170fde352d96 Mon Sep 17 00:00:00 2001 From: Valentin Rocher Date: Thu, 4 Feb 2021 12:35:38 +0100 Subject: add detection of JvmSynthetic (#1718) --- plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt (limited to 'plugins/kotlin-as-java/src/main/kotlin/jvmSynthetic.kt') 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.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 -- cgit