diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-08-27 13:45:27 +0200 |
---|---|---|
committer | Marcin Aman <marcin.aman@gmail.com> | 2021-08-27 13:45:27 +0200 |
commit | 459a0005824de412ff7d4472c1eb4d6fb7c2a7cc (patch) | |
tree | 0ccdbf1d2b5b7e3ad54f70df9284d63a29f058f5 /plugins/kotlin-as-java | |
parent | 8e1848edfa24acb6b12fad067a6cedbb7be0426b (diff) | |
download | dokka-459a0005824de412ff7d4472c1eb4d6fb7c2a7cc.tar.gz dokka-459a0005824de412ff7d4472c1eb4d6fb7c2a7cc.tar.bz2 dokka-459a0005824de412ff7d4472c1eb4d6fb7c2a7cc.zip |
Restore language level to 1.4
Diffstat (limited to 'plugins/kotlin-as-java')
-rw-r--r-- | plugins/kotlin-as-java/src/main/kotlin/jvmField.kt | 2 | ||||
-rw-r--r-- | plugins/kotlin-as-java/src/main/kotlin/jvmName.kt | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt b/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt index f54f844c..3e57f4d0 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/jvmField.kt @@ -5,7 +5,7 @@ import org.jetbrains.dokka.model.Documentable import org.jetbrains.dokka.model.properties.WithExtraProperties internal fun WithExtraProperties<out Documentable>.jvmField(): Annotations.Annotation? = - extra[Annotations]?.directAnnotations?.entries?.firstNotNullOfOrNull { (_, annotations) -> annotations.jvmFieldAnnotation() } + extra[Annotations]?.directAnnotations?.entries?.mapNotNull { (_, annotations) -> annotations.jvmFieldAnnotation() }?.firstOrNull() 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 53f3430b..44271f2c 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/jvmName.kt @@ -5,12 +5,13 @@ 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.util.firstNotNullResult internal fun WithExtraProperties<out Documentable>.directlyAnnotatedJvmName(): Annotations.Annotation? = - extra[Annotations]?.directAnnotations?.entries?.firstNotNullOfOrNull { (_, annotations)-> annotations.jvmNameAnnotation() } + extra[Annotations]?.directAnnotations?.entries?.firstNotNullResult { (_, annotations)-> annotations.jvmNameAnnotation() } internal fun WithExtraProperties<out Documentable>.fileLevelJvmName(): Annotations.Annotation? = - extra[Annotations]?.fileLevelAnnotations?.entries?.firstNotNullOfOrNull { (_, annotations) -> annotations.jvmNameAnnotation() } + extra[Annotations]?.fileLevelAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmNameAnnotation() } internal fun List<Annotations.Annotation>.jvmNameAnnotation(): Annotations.Annotation? = firstOrNull { it.isJvmName() } |