From 785d741790f653d5c260f59c9d8875bbfde2dc07 Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Wed, 12 Aug 2020 14:26:45 +0200 Subject: Fix generic supertypes to hold TypeParameters --- .../org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt | 2 +- .../dokka/javadoc/renderer/JavadocContentToTemplateMapTranslator.kt | 2 +- .../jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/javadoc') diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt index d99a571f..d5499f0b 100644 --- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt +++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt @@ -83,7 +83,7 @@ class JavadocLocationProvider(pageRoot: RootPageNode, dokkaContext: DokkaContext when (val bound = if (it.typeBound is org.jetbrains.dokka.model.Nullable) it.typeBound.inner else it.typeBound) { is TypeConstructor -> bound.dri.classNames.orEmpty() - is OtherParameter -> bound.name + is TypeParameter -> bound.name is PrimitiveJavaType -> bound.name is UnresolvedBound -> bound.name is JavaObject -> "Object" diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToTemplateMapTranslator.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToTemplateMapTranslator.kt index 57255cf1..49ba1b25 100644 --- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToTemplateMapTranslator.kt +++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/JavadocContentToTemplateMapTranslator.kt @@ -128,7 +128,7 @@ internal class JavadocContentToTemplateMapTranslator( ) private fun templateMapForImplementedInterfaces(node: JavadocClasslikePageNode) = - node.extra[ImplementedInterfaces]?.interfaces?.entries?.firstOrNull { it.key.analysisPlatform == Platform.jvm }?.value?.map { it.displayable() } // TODO: REMOVE HARDCODED JVM DEPENDENCY + node.extra[ImplementedInterfaces]?.interfaces?.entries?.firstOrNull { it.key.analysisPlatform == Platform.jvm }?.value?.map { it.dri.displayable() } // TODO: REMOVE HARDCODED JVM DEPENDENCY .orEmpty() private fun templateMapForClasslikeMethods(nodes: List): TemplateMap { diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt index a60d7711..5e655b0d 100644 --- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt +++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt @@ -71,10 +71,10 @@ class JavadocSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLo c.supertypes.map { (p, dris) -> val (classes, interfaces) = dris.partition { it.kind == JavaClassKindTypes.CLASS } list(classes, prefix = "extends ", sourceSets = setOf(p)) { - link(it.dri.sureClassNames, it.dri, sourceSets = setOf(p)) + link(it.typeConstructor.dri.sureClassNames, it.typeConstructor.dri, sourceSets = setOf(p)) } list(interfaces, prefix = " implements ", sourceSets = setOf(p)){ - link(it.dri.sureClassNames, it.dri, sourceSets = setOf(p)) + link(it.typeConstructor.dri.sureClassNames, it.typeConstructor.dri, sourceSets = setOf(p)) } } } @@ -178,7 +178,7 @@ class JavadocSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLo } private fun PageContentBuilder.DocumentableContentBuilder.signatureForProjection(p: Projection): Unit = when (p) { - is OtherParameter -> link(p.name, p.declarationDRI) + is TypeParameter -> link(p.name, p.declarationDRI) is TypeConstructor -> group { link(p.dri.classNames.orEmpty(), p.dri) list(p.projections, prefix = "<", suffix = ">") { -- cgit