aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/jvmField.kt3
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/jvmName.kt5
2 files changed, 3 insertions, 5 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt b/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt
index 9a66eb27..f54f844c 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt
@@ -3,10 +3,9 @@ package org.jetbrains.dokka.kotlinAsJava
import org.jetbrains.dokka.model.Annotations
import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.model.properties.WithExtraProperties
-import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult
internal fun WithExtraProperties<out Documentable>.jvmField(): Annotations.Annotation? =
- extra[Annotations]?.directAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmFieldAnnotation() }
+ extra[Annotations]?.directAnnotations?.entries?.firstNotNullOfOrNull { (_, annotations) -> annotations.jvmFieldAnnotation() }
internal fun List<Annotations.Annotation>.jvmFieldAnnotation(): Annotations.Annotation? =
firstOrNull { it.dri.packageName == "kotlin.jvm" && it.dri.classNames == "JvmField" } \ No newline at end of file
diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt b/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt
index c81210d6..53f3430b 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt
@@ -5,13 +5,12 @@ import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.model.StringValue
import org.jetbrains.dokka.model.isJvmName
import org.jetbrains.dokka.model.properties.WithExtraProperties
-import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult
internal fun WithExtraProperties<out Documentable>.directlyAnnotatedJvmName(): Annotations.Annotation? =
- extra[Annotations]?.directAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmNameAnnotation() }
+ extra[Annotations]?.directAnnotations?.entries?.firstNotNullOfOrNull { (_, annotations)-> annotations.jvmNameAnnotation() }
internal fun WithExtraProperties<out Documentable>.fileLevelJvmName(): Annotations.Annotation? =
- extra[Annotations]?.fileLevelAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmNameAnnotation() }
+ extra[Annotations]?.fileLevelAnnotations?.entries?.firstNotNullOfOrNull { (_, annotations) -> annotations.jvmNameAnnotation() }
internal fun List<Annotations.Annotation>.jvmNameAnnotation(): Annotations.Annotation? =
firstOrNull { it.isJvmName() }