diff options
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin')
-rw-r--r-- | plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt | 2 | ||||
-rw-r--r-- | plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt | 5 |
2 files changed, 4 insertions, 3 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 c0e9d015..2a0762ba 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt @@ -403,7 +403,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() = when (this) { +private fun TypeConstructor.possiblyAsJava(): TypeConstructor = when (this) { is GenericTypeConstructor -> copy(dri = this.dri.possiblyAsJava()) is FunctionalTypeConstructor -> copy(dri = this.dri.possiblyAsJava()) } diff --git a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt index ecb97617..a50fdf68 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureUtils.kt @@ -5,6 +5,7 @@ import org.jetbrains.dokka.base.signatures.JvmSignatureUtils import org.jetbrains.dokka.base.translators.documentables.PageContentBuilder import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.model.* +import org.jetbrains.dokka.model.AnnotationTarget import org.jetbrains.dokka.model.properties.WithExtraProperties object JavaSignatureUtils : JvmSignatureUtils { @@ -21,10 +22,10 @@ object JavaSignatureUtils : JvmSignatureUtils { private val listBrackets = Pair('{', '}') private val classExtension = ".class" - override fun PageContentBuilder.DocumentableContentBuilder.annotationsBlock(d: Documentable) = + override fun PageContentBuilder.DocumentableContentBuilder.annotationsBlock(d: AnnotationTarget) = annotationsBlockWithIgnored(d, ignoredAnnotations, strategy, listBrackets, classExtension) - override fun PageContentBuilder.DocumentableContentBuilder.annotationsInline(d: Documentable) = + override fun PageContentBuilder.DocumentableContentBuilder.annotationsInline(d: AnnotationTarget) = annotationsInlineWithIgnored(d, ignoredAnnotations, strategy, listBrackets, classExtension) override fun <T : Documentable> WithExtraProperties<T>.modifiers() = |