diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-06-16 17:49:02 +0200 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-06-16 17:49:02 +0200 |
commit | c858ffdfdc18d855c7964a686a44dc4aa118db10 (patch) | |
tree | d3b9e6a014d230d4886ee92defe0b2a422c156e0 /src/Kotlin/DocumentationBuilder.kt | |
parent | fa8bdfa56d847b81206aaea24e2b081bf3d666b4 (diff) | |
download | dokka-c858ffdfdc18d855c7964a686a44dc4aa118db10.tar.gz dokka-c858ffdfdc18d855c7964a686a44dc4aa118db10.tar.bz2 dokka-c858ffdfdc18d855c7964a686a44dc4aa118db10.zip |
some cleanup
Diffstat (limited to 'src/Kotlin/DocumentationBuilder.kt')
-rw-r--r-- | src/Kotlin/DocumentationBuilder.kt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt index 4af53d88..8bbd7743 100644 --- a/src/Kotlin/DocumentationBuilder.kt +++ b/src/Kotlin/DocumentationBuilder.kt @@ -425,6 +425,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, } fun ScriptDescriptor.build(): DocumentationNode = getClassDescriptor().build() + fun ClassDescriptor.build(): DocumentationNode { val kind = when (getKind()) { ClassKind.OBJECT -> Kind.Object @@ -449,9 +450,9 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, } val members = getDefaultType().getMemberScope().getAllDescriptors().filter { it != getCompanionObjectDescriptor() } node.appendChildren(members, DocumentationReference.Kind.Member) - val defaultObjectDescriptor = getCompanionObjectDescriptor() - if (defaultObjectDescriptor != null) { - node.appendChildren(defaultObjectDescriptor.getDefaultType().getMemberScope().getAllDescriptors(), + val companionObjectDescriptor = getCompanionObjectDescriptor() + if (companionObjectDescriptor != null) { + node.appendChildren(companionObjectDescriptor.getDefaultType().getMemberScope().getAllDescriptors(), DocumentationReference.Kind.Member) } node.appendAnnotations(this) @@ -545,11 +546,11 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, } val token = if (arity == 2) { - OperatorConventions.BINARY_OPERATION_NAMES.inverse().get(getName()) ?: - OperatorConventions.ASSIGNMENT_OPERATIONS.inverse().get(getName()) ?: - OperatorConventions.BOOLEAN_OPERATIONS.inverse().get(getName()) + OperatorConventions.BINARY_OPERATION_NAMES.inverse()[getName()] ?: + OperatorConventions.ASSIGNMENT_OPERATIONS.inverse()[getName()] ?: + OperatorConventions.BOOLEAN_OPERATIONS.inverse()[getName()] } else if (arity == 1) { - OperatorConventions.UNARY_OPERATION_NAMES.inverse().get(getName()) + OperatorConventions.UNARY_OPERATION_NAMES.inverse()[getName()] } else null |