aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/links/DRI.kt2
-rw-r--r--plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt14
2 files changed, 7 insertions, 9 deletions
diff --git a/core/src/main/kotlin/links/DRI.kt b/core/src/main/kotlin/links/DRI.kt
index 3892fc00..4a555e71 100644
--- a/core/src/main/kotlin/links/DRI.kt
+++ b/core/src/main/kotlin/links/DRI.kt
@@ -1,8 +1,6 @@
package org.jetbrains.dokka.links
import org.jetbrains.dokka.model.ClassKind
-import org.jetbrains.dokka.model.Documentable
-import org.jetbrains.dokka.model.WithSupertypes
/**
* [DRI] stands for DokkaResourceIdentifier
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
index 9ca8cdde..54bd793c 100644
--- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
@@ -554,28 +554,28 @@ private class DokkaDescriptorVisitor(
getDocumentation()?.toSourceSetDependent() ?: emptyMap()
private fun ClassDescriptor.resolveClassDescriptionData(): ClassInfo {
- tailrec fun processSuperClasses(
+ tailrec fun buildInheritanceInformation(
inheritorClass: ClassDescriptor?,
interfaces: List<ClassDescriptor>,
level: Int = 0,
- inheritanceTree: Set<InheritanceLevel> = emptySet()
+ inheritanceInformation: Set<InheritanceLevel> = emptySet()
): Set<InheritanceLevel> {
- if (inheritorClass == null && interfaces.isEmpty()) return inheritanceTree
+ if (inheritorClass == null && interfaces.isEmpty()) return inheritanceInformation
- val updatedTree = inheritanceTree + InheritanceLevel(
+ val updated = inheritanceInformation + InheritanceLevel(
level,
inheritorClass?.let { DRI.from(it) },
interfaces.map { DRI.from(it) })
val superInterfacesFromClass = inheritorClass?.getSuperInterfaces().orEmpty()
- return processSuperClasses(
+ return buildInheritanceInformation(
inheritorClass = inheritorClass?.getSuperClassNotAny(),
interfaces = interfaces.flatMap { it.getSuperInterfaces() } + superInterfacesFromClass,
level = level + 1,
- inheritanceTree = updatedTree
+ inheritanceInformation = updated
)
}
return ClassInfo(
- processSuperClasses(getSuperClassNotAny(), getSuperInterfaces()).sortedBy { it.level },
+ buildInheritanceInformation(getSuperClassNotAny(), getSuperInterfaces()).sortedBy { it.level },
resolveDescriptorData()
)
}