From 17e25efa87dc6eea3b1e098619a07a65f0b3f8e8 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 16 Feb 2015 15:55:49 +0100 Subject: represent java.lang.Object as 'Any' --- src/Java/JavaDocumentationBuilder.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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() -- cgit