aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/javadoc/docbase.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/src/main/kotlin/javadoc/docbase.kt b/core/src/main/kotlin/javadoc/docbase.kt
index eafa216b..65b28a42 100644
--- a/core/src/main/kotlin/javadoc/docbase.kt
+++ b/core/src/main/kotlin/javadoc/docbase.kt
@@ -209,8 +209,12 @@ open class TypeAdapter(override val module: ModuleNodeAdapter, override val node
override fun equals(other: Any?): Boolean = other is TypeAdapter && toString() == other.toString()
}
+class NotAnnotatedTypeAdapter(typeAdapter: AnnotatedTypeAdapter) : Type by typeAdapter {
+ override fun asAnnotatedType() = null
+}
+
class AnnotatedTypeAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : TypeAdapter(module, node), AnnotatedType {
- override fun underlyingType(): Type? = this
+ override fun underlyingType(): Type? = NotAnnotatedTypeAdapter(this)
override fun annotations(): Array<out AnnotationDesc> = nodeAnnotations(this).toTypedArray()
}