diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2020-07-07 15:45:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 15:45:32 +0200 |
commit | 63823e14794136c23359aab9f40b8d8dcfe504dd (patch) | |
tree | f65f3aee6e6d4086bd217387116261a14de5a6cb /plugins/base/src/main/kotlin/translators | |
parent | 6c1403cd8ffab5e13f12a2744846a70b31710b09 (diff) | |
download | dokka-63823e14794136c23359aab9f40b8d8dcfe504dd.tar.gz dokka-63823e14794136c23359aab9f40b8d8dcfe504dd.tar.bz2 dokka-63823e14794136c23359aab9f40b8d8dcfe504dd.zip |
Javadoc signature provider (#1041)
Javadoc signature provider #1025
Diffstat (limited to 'plugins/base/src/main/kotlin/translators')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt index 5a55e3ec..5e03be6e 100644 --- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt @@ -317,10 +317,15 @@ class DefaultPsiToDocumentableTranslator( is PsiClassReferenceType -> { val resolved: PsiClass = type.resolve() ?: return UnresolvedBound(type.presentableText) - if (resolved.qualifiedName == "java.lang.Object") { - JavaObject - } else { - TypeConstructor(DRI.from(resolved), type.parameters.map { getProjection(it) }) + when { + resolved.qualifiedName == "java.lang.Object" -> JavaObject + resolved is PsiTypeParameter && resolved.owner != null -> + OtherParameter( + declarationDRI = DRI.from(resolved.owner!!), + name = resolved.name.orEmpty() + ) + else -> + TypeConstructor(DRI.from(resolved), type.parameters.map { getProjection(it) }) } } is PsiArrayType -> TypeConstructor( @@ -443,7 +448,7 @@ class DefaultPsiToDocumentableTranslator( attributes.filter { it !is KtLightAbstractAnnotation }.mapNotNull { it.attributeName to it.toValue() } .toMap(), (psiElement as PsiClass).annotations.any { - hasQualifiedName("java.lang.annotation.Documented") + it.hasQualifiedName("java.lang.annotation.Documented") } ) } |