diff options
Diffstat (limited to 'plugins/base')
-rw-r--r-- | plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt | 3 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt | 15 |
2 files changed, 10 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt b/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt index 2a242948..689f6db5 100644 --- a/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt +++ b/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt @@ -21,9 +21,6 @@ interface JvmSignatureUtils { fun <T : Documentable> WithExtraProperties<T>.annotations(): SourceSetDependent<List<Annotations.Annotation>> = extra[Annotations]?.content ?: emptyMap() - private fun Annotations.Annotation.toSignatureString(): String = - "@" + this.dri.classNames + "(" + this.params.entries.joinToString { it.key + "=" + it.value } + ")" - private fun PageContentBuilder.DocumentableContentBuilder.annotations( d: Documentable, ignored: Set<Annotations.Annotation>, 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") } ) } |