diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-08-18 13:18:22 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-08-20 15:36:07 +0200 |
commit | 54df62709a37fc8f55bded26fd5db15f9eb0fd25 (patch) | |
tree | 347eb9eff50fdcc2a260f00c42989e0c7e4d1aff /plugins/kotlin-as-java/src | |
parent | a9be511b052755258bc92225c4f5a8977f174b89 (diff) | |
download | dokka-54df62709a37fc8f55bded26fd5db15f9eb0fd25.tar.gz dokka-54df62709a37fc8f55bded26fd5db15f9eb0fd25.tar.bz2 dokka-54df62709a37fc8f55bded26fd5db15f9eb0fd25.zip |
Hide unused generic type variables in constructor
Diffstat (limited to 'plugins/kotlin-as-java/src')
-rw-r--r-- | plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt | 5 |
1 files changed, 3 insertions, 2 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 efb7b739..b15e1a0d 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt @@ -122,7 +122,8 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge signatureForProjection(returnType) text(nbsp.toString()) link(f.name, f.dri) - list(f.generics, prefix = "<", suffix = ">") { + val usedGenerics = f.generics.filter { f uses it } + list(usedGenerics, prefix = "<", suffix = ">") { +buildSignature(it) } text("(") @@ -149,7 +150,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge } private fun PageContentBuilder.DocumentableContentBuilder.signatureForProjection(p: Projection): Unit = when (p) { - is TypeParameter -> link(p.name, p.declarationDRI) + is TypeParameter -> link(p.name, p.dri) is TypeConstructor -> group(styles = emptySet()) { link(p.dri.classNames.orEmpty(), p.dri) |