aboutsummaryrefslogtreecommitdiff
path: root/src/Model/DocumentationNode.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/DocumentationNode.kt')
-rw-r--r--src/Model/DocumentationNode.kt10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Model/DocumentationNode.kt b/src/Model/DocumentationNode.kt
index 86d2ee04..635d1db9 100644
--- a/src/Model/DocumentationNode.kt
+++ b/src/Model/DocumentationNode.kt
@@ -30,6 +30,10 @@ public open class DocumentationNode(val name: String,
get() = references(DocumentationReference.Kind.Inheritor).map { it.to }
public val links: List<DocumentationNode>
get() = references(DocumentationReference.Kind.Link).map { it.to }
+ public val annotations: List<DocumentationNode>
+ get() = references(DocumentationReference.Kind.Annotation).map { it.to }
+ public val deprecation: DocumentationNode?
+ get() = references(DocumentationReference.Kind.Deprecation).singleOrNull()?.to
// TODO: Should we allow node mutation? Model merge will copy by ref, so references are transparent, which could nice
public fun addReferenceTo(to: DocumentationNode, kind: DocumentationReference.Kind) {
@@ -62,6 +66,7 @@ public open class DocumentationNode(val name: String,
Class
Interface
Enum
+ AnnotationClass
EnumItem
Object
@@ -85,6 +90,11 @@ public open class DocumentationNode(val name: String,
Modifier
Module
+
+ ExternalClass
+ Annotation
+
+ Value
}
}