aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-25 17:56:56 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-25 17:56:56 +0100
commit6306862b6c673caa81644583f10ce5db95e6e868 (patch)
treec86e990e03a444608d7d8c37a7a4c3e5da0e1b5f /src
parenta60d8ba79fd823260582b558f9f61229b12f4f6e (diff)
downloaddokka-6306862b6c673caa81644583f10ce5db95e6e868.tar.gz
dokka-6306862b6c673caa81644583f10ce5db95e6e868.tar.bz2
dokka-6306862b6c673caa81644583f10ce5db95e6e868.zip
use Kotlin style types in element signatures
Diffstat (limited to 'src')
-rw-r--r--src/Java/JavaDocumentationBuilder.kt7
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 {