diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-08-31 20:16:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-31 20:16:01 +0200 |
commit | 02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 (patch) | |
tree | 66f6d6f089a93b863bf1144666491eca6729ad05 /plugins/base/src/main/kotlin/transformers/documentables/utils.kt | |
parent | 6a181a7a2b03ec263788d137610e86937a57d434 (diff) | |
download | dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.gz dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.bz2 dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.zip |
Enable explicit API mode (#3139)
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/documentables/utils.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/documentables/utils.kt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/utils.kt b/plugins/base/src/main/kotlin/transformers/documentables/utils.kt index 8f89dfe7..60a6396a 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/utils.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/utils.kt @@ -9,11 +9,11 @@ import org.jetbrains.dokka.model.Documentable import org.jetbrains.dokka.model.ExceptionInSupertypes import org.jetbrains.dokka.model.properties.WithExtraProperties -val <T : Documentable> WithExtraProperties<T>.isException: Boolean +public val <T : Documentable> WithExtraProperties<T>.isException: Boolean get() = extra[ExceptionInSupertypes] != null -val <T : Documentable> WithExtraProperties<T>.deprecatedAnnotation +public val <T : Documentable> WithExtraProperties<T>.deprecatedAnnotation: Annotations.Annotation? get() = extra[Annotations]?.let { annotations -> annotations.directAnnotations.values.flatten().firstOrNull { it.isDeprecated() @@ -24,11 +24,12 @@ val <T : Documentable> WithExtraProperties<T>.deprecatedAnnotation * @return true if [T] has [kotlin.Deprecated] or [java.lang.Deprecated] * annotation for **any** source set */ -fun <T : Documentable> WithExtraProperties<T>.isDeprecated() = deprecatedAnnotation != null +public fun <T : Documentable> WithExtraProperties<T>.isDeprecated(): Boolean = deprecatedAnnotation != null /** * @return true for [kotlin.Deprecated] and [java.lang.Deprecated] */ -fun Annotations.Annotation.isDeprecated() = - (this.dri.packageName == "kotlin" && this.dri.classNames == "Deprecated") || +public fun Annotations.Annotation.isDeprecated(): Boolean { + return (this.dri.packageName == "kotlin" && this.dri.classNames == "Deprecated") || (this.dri.packageName == "java.lang" && this.dri.classNames == "Deprecated") +} |