blob: 2a5fbc118429bc232caf9fc6d2d3c93408f9c7ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package org.jetbrains.dokka.base.transformers.documentables
import org.jetbrains.dokka.model.Annotations
import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.model.ExceptionInSupertypes
import org.jetbrains.dokka.model.properties.WithExtraProperties
fun <T> T.isDeprecated() where T : WithExtraProperties<out Documentable> =
deprecatedAnnotation != null
val <T> T.deprecatedAnnotation where T : WithExtraProperties<out Documentable>
get() = extra[Annotations]?.let { annotations ->
annotations.directAnnotations.values.flatten().firstOrNull {
it.dri.toString() == "kotlin/Deprecated///PointingToDeclaration/" ||
it.dri.toString() == "java.lang/Deprecated///PointingToDeclaration/"
}
}
val <T : WithExtraProperties<out Documentable>> T.isException: Boolean
get() = extra[ExceptionInSupertypes] != null
|