aboutsummaryrefslogtreecommitdiff
path: root/src/Model
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2015-01-12 16:06:54 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2015-01-12 16:06:54 +0100
commit49feb9021ca24150257caac4a62af5628f52b6b5 (patch)
treee5b53761a5338b9931bfe6969cbee988596ec28e /src/Model
parent5f47bc17630ef1457b36054dc8b19011d9d14132 (diff)
parent23af5e2540aca25ab64deec1821a069f827d7c77 (diff)
downloaddokka-49feb9021ca24150257caac4a62af5628f52b6b5.tar.gz
dokka-49feb9021ca24150257caac4a62af5628f52b6b5.tar.bz2
dokka-49feb9021ca24150257caac4a62af5628f52b6b5.zip
Merge pull request #9 from orangy/annotations
Support annotation classes and annotations in model and rendered output
Diffstat (limited to 'src/Model')
-rw-r--r--src/Model/Content.kt1
-rw-r--r--src/Model/DocumentationNode.kt10
-rw-r--r--src/Model/DocumentationReference.kt2
3 files changed, 13 insertions, 0 deletions
diff --git a/src/Model/Content.kt b/src/Model/Content.kt
index e1c1ef78..8491fd88 100644
--- a/src/Model/Content.kt
+++ b/src/Model/Content.kt
@@ -27,6 +27,7 @@ public class ContentSymbol(val text: String) : ContentNode()
public class ContentParagraph() : ContentBlock()
public class ContentEmphasis() : ContentBlock()
public class ContentStrong() : ContentBlock()
+public class ContentStrikethrough() : ContentBlock()
public class ContentCode() : ContentBlock()
public class ContentBlockCode() : ContentBlock()
public class ContentNodeLink(val node : DocumentationNode) : ContentBlock()
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
}
}
diff --git a/src/Model/DocumentationReference.kt b/src/Model/DocumentationReference.kt
index 1849fe08..bd40f0f5 100644
--- a/src/Model/DocumentationReference.kt
+++ b/src/Model/DocumentationReference.kt
@@ -9,6 +9,8 @@ public data class DocumentationReference(val from: DocumentationNode, val to: Do
Extension
Inheritor
Override
+ Annotation
+ Deprecation
}
}