diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-09-09 14:26:28 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-09-10 13:11:02 +0200 |
commit | 3792ef312ef347ef3300690e71c1cbf963a175e3 (patch) | |
tree | 8c9ece686ca772896602a8571ea54fcbd894d1bd /plugins/kotlin-as-java/src/main/kotlin/signatures | |
parent | d8a3e7db72109c8f439095a924bdc1da47b6ab6a (diff) | |
download | dokka-3792ef312ef347ef3300690e71c1cbf963a175e3.tar.gz dokka-3792ef312ef347ef3300690e71c1cbf963a175e3.tar.bz2 dokka-3792ef312ef347ef3300690e71c1cbf963a175e3.zip |
Add tests
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin/signatures')
-rw-r--r-- | plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt | 13 |
1 files changed, 9 insertions, 4 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 d24fa428..1d62a206 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt @@ -79,10 +79,10 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge c.supertypes.map { (p, dris) -> val (classes, interfaces) = dris.partition { it.kind == JavaClassKindTypes.CLASS } list(classes, prefix = " extends ", sourceSets = setOf(p)) { - link(it.typeConstructor.dri.sureClassNames, it.typeConstructor.dri, sourceSets = setOf(p)) + signatureForProjection(it.typeConstructor) } - list(interfaces, prefix = " implements ", sourceSets = setOf(p)){ - link(it.typeConstructor.dri.sureClassNames, it.typeConstructor.dri, sourceSets = setOf(p)) + list(interfaces, prefix = " implements ", sourceSets = setOf(p)) { + signatureForProjection(it.typeConstructor) } } } @@ -160,7 +160,12 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge } is Variance<*> -> group(styles = emptySet()) { - text("$p ".takeIf { it.isNotBlank() } ?: "") // TODO: "super" && "extends" + val variance = when(p) { + is Covariance<*> -> "? extends " + is Contravariance<*> -> "? super " + is Invariance<*> -> "" + } + text(variance) signatureForProjection(p.inner) } |