aboutsummaryrefslogtreecommitdiff
path: root/src/Java/JavaDocumentationBuilder.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/JavaDocumentationBuilder.kt')
-rw-r--r--src/Java/JavaDocumentationBuilder.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt
index f1a9c520..f3cc38f7 100644
--- a/src/Java/JavaDocumentationBuilder.kt
+++ b/src/Java/JavaDocumentationBuilder.kt
@@ -186,7 +186,10 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions)
private fun mapTypeName(psiType: PsiType): String = when (psiType) {
PsiType.VOID -> "Unit"
is PsiPrimitiveType -> psiType.getCanonicalText().capitalize()
- is PsiClassType -> psiType.getClassName()
+ is PsiClassType -> {
+ val psiClass = psiType.resolve()
+ if (psiClass?.getQualifiedName() == "java.lang.Object") "Any" else psiType.getClassName()
+ }
is PsiEllipsisType -> mapTypeName(psiType.getComponentType())
is PsiArrayType -> "Array"
else -> psiType.getCanonicalText()