aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/main/kotlin/JavaSignatureProvider.kt
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-03-04 17:04:50 +0100
committerKamil Doległo <kamilok1965@users.noreply.github.com>2020-03-04 18:00:19 +0100
commitfc875fe5f8bc52ac75053db097b3349465705732 (patch)
treea2e3291170b88336c906210c5570081a217326b4 /plugins/kotlin-as-java/src/main/kotlin/JavaSignatureProvider.kt
parentea0945efe8c7b5dd9aabc4f049afaac612b70422 (diff)
downloaddokka-fc875fe5f8bc52ac75053db097b3349465705732.tar.gz
dokka-fc875fe5f8bc52ac75053db097b3349465705732.tar.bz2
dokka-fc875fe5f8bc52ac75053db097b3349465705732.zip
Refactor Modifiers
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin/JavaSignatureProvider.kt')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/JavaSignatureProvider.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/JavaSignatureProvider.kt b/plugins/kotlin-as-java/src/main/kotlin/JavaSignatureProvider.kt
index 8e2c783e..06224a7a 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/JavaSignatureProvider.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/JavaSignatureProvider.kt
@@ -18,7 +18,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
private val ignoredVisibilities = setOf(JavaVisibility.Default, KotlinVisibility.Public)
private val ignoredModifiers =
- setOf(WithAbstraction.Modifier.Open, WithAbstraction.Modifier.Empty, WithAbstraction.Modifier.Sealed)
+ setOf(KotlinModifier.Open, JavaModifier.Empty, KotlinModifier.Empty, KotlinModifier.Sealed)
override fun signature(documentable: Documentable): ContentNode = when (documentable) {
@@ -34,7 +34,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
platformText(c.visibility) { (it.takeIf { it !in ignoredVisibilities }?.name ?: "") + " " }
if (c is Class) {
- text(c.modifier.takeIf { it !in ignoredModifiers }?.toString()?.toLowerCase().orEmpty() + " ")
+ text(c.modifier.takeIf { it !in ignoredModifiers }?.name.orEmpty() + " ")
}
when (c) {
@@ -60,7 +60,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
}
private fun signature(f: Function) = contentBuilder.contentFor(f, ContentKind.Symbol) {
- text(f.modifier.takeIf { it != WithAbstraction.Modifier.Empty }?.toString()?.toLowerCase().orEmpty() + " ")
+ text(f.modifier.takeIf { it !in ignoredModifiers }?.name.orEmpty() + " ")
val returnType = f.type
if (!f.isConstructor && returnType.constructorFqName != Unit::class.qualifiedName) {
type(returnType)