aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-08-21 15:26:17 +0200
committerBłażej Kardyś <bkardys@virtuslab.com>2020-08-21 15:48:01 +0200
commit39b64feead5718ae9d3e4293407cf0858057493a (patch)
tree0c33c8ee5d213004f3fce9846448bb56e9d026b1 /plugins/base/src/main/kotlin/transformers
parentfaf621b643ad2b4b7103d921d4a2d9d4838a21d6 (diff)
downloaddokka-39b64feead5718ae9d3e4293407cf0858057493a.tar.gz
dokka-39b64feead5718ae9d3e4293407cf0858057493a.tar.bz2
dokka-39b64feead5718ae9d3e4293407cf0858057493a.zip
Adding missing deprecated exception section to Deprecated page
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers')
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/utils.kt8
1 files changed, 8 insertions, 0 deletions
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> T.isDeprecated() where T : WithExtraProperties<out Documentable> =
@@ -13,4 +14,11 @@ val <T> T.deprecatedAnnotation where T : WithExtraProperties<out Documentable>
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