From 6306862b6c673caa81644583f10ce5db95e6e868 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 25 Feb 2015 17:56:56 +0100 Subject: use Kotlin style types in element signatures --- src/Java/JavaDocumentationBuilder.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Java') diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt index ba766e3f..55f9017b 100644 --- a/src/Java/JavaDocumentationBuilder.kt +++ b/src/Java/JavaDocumentationBuilder.kt @@ -129,10 +129,15 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions, is PsiField -> element.getContainingClass().getQualifiedName() + "#" + element.getName() is PsiMethod -> element.getContainingClass().getQualifiedName() + "#" + element.getName() + "(" + - element.getParameterList().getParameters().map { it.getType().getCanonicalText() }.join(",") + ")" + element.getParameterList().getParameters().map { it.getType().typeSignature() }.join(",") + ")" else -> null } + private fun PsiType.typeSignature(): String = when(this) { + is PsiArrayType -> "Array<${getComponentType().typeSignature()}>" + else -> mapTypeName(this) + } + fun DocumentationNode(element: PsiNamedElement, kind: Kind, name: String = element.getName() ?: ""): DocumentationNode { -- cgit