aboutsummaryrefslogtreecommitdiff
path: root/src/DocumentationBuildingVisitor.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-11 20:32:27 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-11 20:32:27 +0400
commiteb290376627a04492b8cde48ba608b061d59c8dc (patch)
tree43852d0b75853a865ca13f1cde7bbc687157dcab /src/DocumentationBuildingVisitor.kt
parentf2f6fd9fa48aaa49e16eaa78b86be89e1a232ad7 (diff)
downloaddokka-eb290376627a04492b8cde48ba608b061d59c8dc.tar.gz
dokka-eb290376627a04492b8cde48ba608b061d59c8dc.tar.bz2
dokka-eb290376627a04492b8cde48ba608b061d59c8dc.zip
Add support for objects.
Diffstat (limited to 'src/DocumentationBuildingVisitor.kt')
-rw-r--r--src/DocumentationBuildingVisitor.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/DocumentationBuildingVisitor.kt b/src/DocumentationBuildingVisitor.kt
index 4f76ed0e..31c126fc 100644
--- a/src/DocumentationBuildingVisitor.kt
+++ b/src/DocumentationBuildingVisitor.kt
@@ -66,9 +66,12 @@ class DocumentationBuildingVisitor(private val worker: DeclarationDescriptorVisi
public override fun visitClassDescriptor(descriptor: ClassDescriptor?, data: DocumentationNode?): DocumentationNode? {
val node = createDocumentation(descriptor!!, data!!)
- visitChildren(descriptor.getConstructors(), node)
- visitChildren(descriptor.getTypeConstructor().getParameters(), node)
- visitChild(descriptor.getClassObjectDescriptor(), node)
+ if (descriptor.getKind() != ClassKind.OBJECT) {
+ // do not go inside object for class object and constructors, they are generated
+ visitChildren(descriptor.getTypeConstructor().getParameters(), node)
+ visitChildren(descriptor.getConstructors(), node)
+ visitChild(descriptor.getClassObjectDescriptor(), node)
+ }
val members = descriptor.getDefaultType().getMemberScope().getAllDescriptors().filter {
it !is CallableMemberDescriptor || it.isUserCode()
}