aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/DocumentationBuilder.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-17 12:32:17 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-17 12:32:17 +0100
commit2822a3eee07a27495d5af4fc36304d483756d3a6 (patch)
tree77b1023320f74dcc004b5f2c8b2e210b669aeebd /src/Kotlin/DocumentationBuilder.kt
parentc28923c56bb0c9d5271ceadfafe42e562862acac (diff)
downloaddokka-2822a3eee07a27495d5af4fc36304d483756d3a6.tar.gz
dokka-2822a3eee07a27495d5af4fc36304d483756d3a6.tar.bz2
dokka-2822a3eee07a27495d5af4fc36304d483756d3a6.zip
updated according to language change: class object -> default object
Diffstat (limited to 'src/Kotlin/DocumentationBuilder.kt')
-rw-r--r--src/Kotlin/DocumentationBuilder.kt9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt
index e77f97c9..0ad93801 100644
--- a/src/Kotlin/DocumentationBuilder.kt
+++ b/src/Kotlin/DocumentationBuilder.kt
@@ -270,8 +270,9 @@ class DocumentationBuilder(val session: ResolveSession, val options: Documentati
getConstructors()
node.appendChildren(constructorsToDocument, DocumentationReference.Kind.Member)
}
- node.appendChildren(getDefaultType().getMemberScope().getAllDescriptors(), DocumentationReference.Kind.Member)
- val classObjectDescriptor = getClassObjectDescriptor()
+ val members = getDefaultType().getMemberScope().getAllDescriptors().filter { it != getDefaultObjectDescriptor() }
+ node.appendChildren(members, DocumentationReference.Kind.Member)
+ val classObjectDescriptor = getDefaultObjectDescriptor()
if (classObjectDescriptor != null) {
node.appendChildren(classObjectDescriptor.getDefaultType().getMemberScope().getAllDescriptors(),
DocumentationReference.Kind.Member)
@@ -302,7 +303,7 @@ class DocumentationBuilder(val session: ResolveSession, val options: Documentati
}
fun FunctionDescriptor.build(): DocumentationNode {
- val node = DocumentationNode(this, if (inClassObject()) Kind.ClassObjectFunction else Kind.Function)
+ val node = DocumentationNode(this, if (inClassObject()) Kind.DefaultObjectFunction else Kind.Function)
node.appendChildren(getTypeParameters(), DocumentationReference.Kind.Detail)
getExtensionReceiverParameter()?.let { node.appendChild(it, DocumentationReference.Kind.Detail) }
@@ -328,7 +329,7 @@ class DocumentationBuilder(val session: ResolveSession, val options: Documentati
}
fun PropertyDescriptor.build(): DocumentationNode {
- val node = DocumentationNode(this, if (inClassObject()) Kind.ClassObjectProperty else Kind.Property)
+ val node = DocumentationNode(this, if (inClassObject()) Kind.DefaultObjectProperty else Kind.Property)
node.appendChildren(getTypeParameters(), DocumentationReference.Kind.Detail)
getExtensionReceiverParameter()?.let { node.appendChild(it, DocumentationReference.Kind.Detail) }
node.appendType(getReturnType())