From d180633e91afd76de788a0bd1bfe75fe09f19aea Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Wed, 8 Jul 2020 11:33:28 +0200 Subject: Rename processSuperClasses to buildInheritanceInformation --- .../DefaultDescriptorToDocumentableTranslator.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/base/src/main/kotlin') 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, level: Int = 0, - inheritanceTree: Set = emptySet() + inheritanceInformation: Set = emptySet() ): Set { - 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() ) } -- cgit