aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kotlin-as-java/src/main')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt7
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt6
2 files changed, 7 insertions, 6 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt b/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt
index e66266a2..58c62622 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt
@@ -257,6 +257,7 @@ internal fun String.getAsPrimitive(): JvmPrimitiveType? = org.jetbrains.kotlin.b
private fun DRI.partialFqName() = packageName?.let { "$it." } + classNames
private fun DRI.possiblyAsJava() = this.partialFqName().mapToJava()?.toDRI(this) ?: this
+private fun TypeConstructor.possiblyAsJava() = copy(dri = this.dri.possiblyAsJava())
private fun String.mapToJava(): ClassId? =
JavaToKotlinClassMap.mapKotlinToJava(FqName(this).toUnsafe())
@@ -269,9 +270,9 @@ internal fun ClassId.toDRI(dri: DRI?): DRI = DRI(
target = PointingToDeclaration
)
-internal fun DriWithKind.asJava(): DriWithKind =
- DriWithKind(
- dri = dri.possiblyAsJava(),
+internal fun TypeConstructorWithKind.asJava(): TypeConstructorWithKind =
+ TypeConstructorWithKind(
+ typeConstructor = typeConstructor.possiblyAsJava(),
kind = kind.asJava()
)
diff --git a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
index 158dda22..efb7b739 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
@@ -79,10 +79,10 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
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))
}
}
}
@@ -149,7 +149,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
}
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(styles = emptySet()) {
link(p.dri.classNames.orEmpty(), p.dri)