aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/main/kotlin/signatures
diff options
context:
space:
mode:
authorAndriy Trypilka <54888768+tripolkaandrey@users.noreply.github.com>2022-05-27 11:20:58 +0300
committerGitHub <noreply@github.com>2022-05-27 10:20:58 +0200
commitad5f857a85ee4a1667197b7b2ddd285c4fc5e463 (patch)
tree39e6b8c5ac7dd37be05f326d2d1dd7ae6682560f /plugins/kotlin-as-java/src/main/kotlin/signatures
parent01eb31a3e0051a8faa2b3aa5cbf6ff8895ed1385 (diff)
downloaddokka-ad5f857a85ee4a1667197b7b2ddd285c4fc5e463.tar.gz
dokka-ad5f857a85ee4a1667197b7b2ddd285c4fc5e463.tar.bz2
dokka-ad5f857a85ee4a1667197b7b2ddd285c4fc5e463.zip
Make the `kotlin-as-java` plugin include information about access modifiers for functions (#2510)
* Include access modifiers for Java functions * Test that access modifiers are present * Modify existing tests due to including access modifier in output
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin/signatures')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt1
1 files changed, 1 insertions, 0 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 1f5719ea..2b56a2bf 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
@@ -131,6 +131,7 @@ class JavaSignatureProvider internal constructor(ctcc: CommentsToContentConverte
sourceSets = setOf(sourceSet)
) {
annotationsBlock(f)
+ f.visibility[sourceSet]?.takeIf { it !in ignoredVisibilities }?.name?.let { keyword("$it ") }
f.modifier[sourceSet]?.takeIf { it !in ignoredModifiers }?.name?.plus(" ")?.let { keyword(it) }
f.modifiers()[sourceSet]?.toSignatureString()?.let { keyword(it) }
val returnType = f.type