diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-11 20:32:27 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-11 20:32:27 +0400 |
commit | eb290376627a04492b8cde48ba608b061d59c8dc (patch) | |
tree | 43852d0b75853a865ca13f1cde7bbc687157dcab /src/DocumentationBuildingVisitor.kt | |
parent | f2f6fd9fa48aaa49e16eaa78b86be89e1a232ad7 (diff) | |
download | dokka-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.kt | 9 |
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() } |