diff options
Diffstat (limited to 'core/src/main/kotlin/Model')
-rw-r--r-- | core/src/main/kotlin/Model/DocumentationNode.kt | 7 | ||||
-rw-r--r-- | core/src/main/kotlin/Model/DocumentationReference.kt | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt index f2b3a937..5607c6d3 100644 --- a/core/src/main/kotlin/Model/DocumentationNode.kt +++ b/core/src/main/kotlin/Model/DocumentationNode.kt @@ -116,6 +116,13 @@ open class DocumentationNode(val name: String, val externalType: DocumentationNode? get() = references(RefKind.ExternalType).map { it.to }.firstOrNull() + var sinceKotlin: String? + get() = references(RefKind.SinceKotlin).singleOrNull()?.to?.name + set(value) { + if(value == null) return dropReferences { it.kind == RefKind.SinceKotlin } + append(DocumentationNode(value, Content.Empty, NodeKind.Value), RefKind.SinceKotlin) + } + val supertypes: List<DocumentationNode> get() = details(NodeKind.Supertype) diff --git a/core/src/main/kotlin/Model/DocumentationReference.kt b/core/src/main/kotlin/Model/DocumentationReference.kt index e10796d2..1f2fc0c9 100644 --- a/core/src/main/kotlin/Model/DocumentationReference.kt +++ b/core/src/main/kotlin/Model/DocumentationReference.kt @@ -20,7 +20,8 @@ enum class RefKind { TopLevelPage, Platform, ExternalType, - Origin + Origin, + SinceKotlin } data class DocumentationReference(val from: DocumentationNode, val to: DocumentationNode, val kind: RefKind) { |