From 39b64feead5718ae9d3e4293407cf0858057493a Mon Sep 17 00:00:00 2001 From: Błażej Kardyś Date: Fri, 21 Aug 2020 15:26:17 +0200 Subject: Adding missing deprecated exception section to Deprecated page --- plugins/base/src/main/kotlin/transformers/documentables/utils.kt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/base/src/main/kotlin/transformers') diff --git a/plugins/base/src/main/kotlin/transformers/documentables/utils.kt b/plugins/base/src/main/kotlin/transformers/documentables/utils.kt index a8f13ad8..6b87fe39 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/utils.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/utils.kt @@ -2,6 +2,7 @@ package org.jetbrains.dokka.base.transformers.documentables import org.jetbrains.dokka.model.Annotations import org.jetbrains.dokka.model.Documentable +import org.jetbrains.dokka.model.WithSupertypes import org.jetbrains.dokka.model.properties.WithExtraProperties fun T.isDeprecated() where T : WithExtraProperties = @@ -13,4 +14,11 @@ val T.deprecatedAnnotation where T : WithExtraProperties it.dri.toString() == "kotlin/Deprecated///PointingToDeclaration/" || it.dri.toString() == "java.lang/Deprecated///PointingToDeclaration/" } + } + +val WithSupertypes.isException: Boolean + get() = supertypes.values.flatten().any { + val dri = it.typeConstructor.dri.toString() + dri == "kotlin/Exception///PointingToDeclaration/" || + dri == "java.lang/Exception///PointingToDeclaration/" } \ No newline at end of file -- cgit