aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/main/kotlin
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-06-17 14:38:02 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-06-18 09:29:02 +0200
commit295c8f1ad4d51e124efe4bbeb4351fa4db6b40d1 (patch)
tree0410dc70a7b3a04a73a933a91065145276a3ac98 /plugins/kotlin-as-java/src/main/kotlin
parent4ac93c20f3936d5824b77a04806a2cdcfbb5e25f (diff)
downloaddokka-295c8f1ad4d51e124efe4bbeb4351fa4db6b40d1.tar.gz
dokka-295c8f1ad4d51e124efe4bbeb4351fa4db6b40d1.tar.bz2
dokka-295c8f1ad4d51e124efe4bbeb4351fa4db6b40d1.zip
KotlinSignatureProvider: Render 'fun interface' into signature
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt18
1 files changed, 9 insertions, 9 deletions
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 0eb25504..94eda40f 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
@@ -37,11 +37,11 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
private fun signature(c: DClasslike) =
contentBuilder.contentFor(c, ContentKind.Symbol, setOf(TextStyle.Monospace)) {
- platformText(c.visibility) { (it.takeIf { it !in ignoredVisibilities }?.name ?: "") + " " }
+ sourceSetDependentText(c.visibility) { (it.takeIf { it !in ignoredVisibilities }?.name ?: "") + " " }
if (c is DClass) {
- platformText(c.modifier) { it.takeIf { it !in ignoredModifiers }?.name.orEmpty() + " " }
- platformText(c.modifiers()) { it.toSignatureString() }
+ sourceSetDependentText(c.modifier) { it.takeIf { it !in ignoredModifiers }?.name.orEmpty() + " " }
+ sourceSetDependentText(c.modifiers()) { it.toSignatureString() }
}
when (c) {
@@ -69,9 +69,9 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
private fun signature(p: DProperty) = contentBuilder.contentFor(p, ContentKind.Symbol, setOf(TextStyle.Monospace)) {
group(styles = setOf(TextStyle.Block)) {
annotationsBlock(p)
- platformText(p.visibility) { (it.takeIf { it !in ignoredVisibilities }?.name ?: "") + " " }
- platformText(p.modifier) { it.name + " " }
- platformText(p.modifiers()) { it.toSignatureString() }
+ sourceSetDependentText(p.visibility) { (it.takeIf { it !in ignoredVisibilities }?.name ?: "") + " " }
+ sourceSetDependentText(p.modifier) { it.name + " " }
+ sourceSetDependentText(p.modifiers()) { it.toSignatureString() }
signatureForProjection(p.type)
text(nbsp.toString())
link(p.name, p.dri)
@@ -81,8 +81,8 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
private fun signature(f: DFunction) = contentBuilder.contentFor(f, ContentKind.Symbol, setOf(TextStyle.Monospace)) {
group(styles = setOf(TextStyle.Block)) {
annotationsBlock(f)
- platformText(f.modifier) { it.takeIf { it !in ignoredModifiers }?.name.orEmpty() + " " }
- platformText(f.modifiers()) { it.toSignatureString() }
+ sourceSetDependentText(f.modifier) { it.takeIf { it !in ignoredModifiers }?.name.orEmpty() + " " }
+ sourceSetDependentText(f.modifiers()) { it.toSignatureString() }
val returnType = f.type
signatureForProjection(returnType)
text(nbsp.toString())
@@ -92,7 +92,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
}
list(f.parameters, "(", ")") {
annotationsInline(it)
- platformText(it.modifiers()) { it.toSignatureString() }
+ sourceSetDependentText(it.modifiers()) { it.toSignatureString() }
signatureForProjection(it.type)
text(nbsp.toString())
link(it.name!!, it.dri)