aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/Model/DocumentationNode.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt
index da85cabf..897e3ad3 100644
--- a/core/src/main/kotlin/Model/DocumentationNode.kt
+++ b/core/src/main/kotlin/Model/DocumentationNode.kt
@@ -104,6 +104,12 @@ open class DocumentationNode(val name: String,
val platforms: List<String>
get() = references(RefKind.Platform).map { it.to.name }
+ val supertypes: List<DocumentationNode>
+ get() = references(RefKind.Superclass).map { it.to }
+
+ val superclass: DocumentationNode?
+ get() = supertypes.find { it.kind == NodeKind.Class }
+
// TODO: Should we allow node mutation? Model merge will copy by ref, so references are transparent, which could nice
fun addReferenceTo(to: DocumentationNode, kind: RefKind) {
references.add(DocumentationReference(this, to, kind))