diff options
Diffstat (limited to 'src/Generation/JavaSignatureGenerator.kt')
-rw-r--r-- | src/Generation/JavaSignatureGenerator.kt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Generation/JavaSignatureGenerator.kt b/src/Generation/JavaSignatureGenerator.kt index bc9b9a46..6ba9ac88 100644 --- a/src/Generation/JavaSignatureGenerator.kt +++ b/src/Generation/JavaSignatureGenerator.kt @@ -25,6 +25,14 @@ class JavaSignatureGenerator : SignatureGenerator { return "package ${node.name}" } + override fun renderModifier(node: DocumentationNode): String { + return when (node.name) { + "open" -> "" + "internal" -> "" + else -> node.name + } + } + override fun renderType(node: DocumentationNode): String { return when (node.name) { "Unit" -> "void" @@ -63,6 +71,13 @@ class JavaSignatureGenerator : SignatureGenerator { }.toString() } + override fun renderModifiersForNode(node: DocumentationNode): String { + val modifiers = node.details(Kind.Modifier).map { renderModifier(it) }.filter { it != ""} + if (modifiers.none()) + return "" + return modifiers.join(" ", postfix = " ") + } + override fun renderClass(node: DocumentationNode): String { return StringBuilder { when (node.kind) { |