diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-01-20 10:41:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 10:41:48 +0100 |
commit | 1f592a7ec2786e0a0b77d224d1414ef3042caae4 (patch) | |
tree | 71d2ec07325d505d2c1b78a71720ddc825b2b87c /plugins/base/src/main/kotlin | |
parent | 93520158b4be59f98015d07e8fecaa7e5a49fd99 (diff) | |
download | dokka-1f592a7ec2786e0a0b77d224d1414ef3042caae4.tar.gz dokka-1f592a7ec2786e0a0b77d224d1414ef3042caae4.tar.bz2 dokka-1f592a7ec2786e0a0b77d224d1414ef3042caae4.zip |
Annotations for parameters (#1704)
Diffstat (limited to 'plugins/base/src/main/kotlin')
2 files changed, 14 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index 1ac519a0..18231601 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -777,7 +777,10 @@ private class DokkaDescriptorVisitor( null, upperBounds.map { it.toBound() }, setOf(sourceSet), - extra = PropertyContainer.withAll(additionalExtras().toSourceSetDependent().toAdditionalModifiers()) + extra = PropertyContainer.withAll( + additionalExtras().toSourceSetDependent().toAdditionalModifiers(), + getAnnotations().toSourceSetDependent().toAnnotations() + ) ) private suspend fun org.jetbrains.kotlin.descriptors.annotations.Annotations.getPresentableName(): String? = diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt index cd51e9dd..5b913dcb 100644 --- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt @@ -360,7 +360,11 @@ class DefaultPsiToDocumentableTranslator( ).toSourceSetDependent(), null, getBound(psiParameter.type), - setOf(sourceSetData) + setOf(sourceSetData), + PropertyContainer.withAll( + psiParameter.annotations.toList().toListOfAnnotations().toSourceSetDependent() + .toAnnotations() + ) ) }, docs.toSourceSetDependent(), @@ -468,7 +472,11 @@ class DefaultPsiToDocumentableTranslator( javadocParser.parseDocumentation(type).toSourceSetDependent(), null, mapBounds(type.bounds), - setOf(sourceSetData) + setOf(sourceSetData), + PropertyContainer.withAll( + type.annotations.toList().toListOfAnnotations().toSourceSetDependent() + .toAnnotations() + ) ) } } |