diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-25 17:56:56 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-25 17:56:56 +0100 |
commit | 6306862b6c673caa81644583f10ce5db95e6e868 (patch) | |
tree | c86e990e03a444608d7d8c37a7a4c3e5da0e1b5f | |
parent | a60d8ba79fd823260582b558f9f61229b12f4f6e (diff) | |
download | dokka-6306862b6c673caa81644583f10ce5db95e6e868.tar.gz dokka-6306862b6c673caa81644583f10ce5db95e6e868.tar.bz2 dokka-6306862b6c673caa81644583f10ce5db95e6e868.zip |
use Kotlin style types in element signatures
-rw-r--r-- | src/Java/JavaDocumentationBuilder.kt | 7 |
1 files changed, 6 insertions, 1 deletions
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() ?: "<anonymous>"): DocumentationNode { |