.dokka.kotlin-as-java-plugin.1.9.10.source-code.jvmName.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-as-java-plugin Show documentation
Show all versions of kotlin-as-java-plugin Show documentation
Dokka is an API documentation engine for Kotlin
/*
* Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
package org.jetbrains.dokka.kotlinAsJava
import org.jetbrains.dokka.model.Annotations
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
internal fun WithExtraProperties.directlyAnnotatedJvmName(): Annotations.Annotation? =
extra[Annotations]?.directAnnotations?.entries?.firstNotNullOfOrNull { (_, annotations)-> annotations.jvmNameAnnotation() }
internal fun WithExtraProperties.fileLevelJvmName(): Annotations.Annotation? =
extra[Annotations]?.fileLevelAnnotations?.entries?.firstNotNullOfOrNull { (_, annotations) -> annotations.jvmNameAnnotation() }
internal fun List.jvmNameAnnotation(): Annotations.Annotation? =
firstOrNull { it.isJvmName() }
internal fun Annotations.Annotation.jvmNameAsString(): String? = (params["name"] as? StringValue)?.value
© 2015 - 2025 Weber Informatics LLC | Privacy Policy