aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kotlin-as-java')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt7
1 files changed, 6 insertions, 1 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 284d6ab9..55dd7a97 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
@@ -23,6 +23,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
override fun signature(documentable: Documentable): ContentNode = when (documentable) {
is Function -> signature(documentable)
+ is Property -> signature(documentable)
is Classlike -> signature(documentable)
is TypeParameter -> signature(documentable)
else -> throw NotImplementedError(
@@ -44,7 +45,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
is Object -> text("class ")
is Annotation -> text("@interface ")
}
- text(c.name!!)
+ link(c.name!!, c.dri)
if (c is WithGenerics) {
list(c.generics, prefix = "<", suffix = ">") {
+buildSignature(it)
@@ -59,6 +60,10 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
}
}
+ private fun signature(p: Property) = contentBuilder.contentFor(p, ContentKind.Symbol, setOf(TextStyle.Monospace)) {
+ signatureForProjection(p.type)
+ }
+
private fun signature(f: Function) = contentBuilder.contentFor(f, ContentKind.Symbol, setOf(TextStyle.Monospace)) {
text(f.modifier.takeIf { it !in ignoredModifiers }?.name.orEmpty() + " ")
val returnType = f.type