From ad5f857a85ee4a1667197b7b2ddd285c4fc5e463 Mon Sep 17 00:00:00 2001 From: Andriy Trypilka <54888768+tripolkaandrey@users.noreply.github.com> Date: Fri, 27 May 2022 11:20:58 +0300 Subject: 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 --- .../kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/kotlin-as-java/src/main/kotlin/signatures') 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 -- cgit