diff options
-rw-r--r-- | src/Java/JavaDocumentationBuilder.kt | 5 | ||||
-rw-r--r-- | test/src/model/JavaTest.kt | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt index 9d8c85a9..c30e6f06 100644 --- a/src/Java/JavaDocumentationBuilder.kt +++ b/src/Java/JavaDocumentationBuilder.kt @@ -147,6 +147,9 @@ public class JavaDocumentationBuilder() { if (this is PsiClassType) { node.appendDetails(getParameters()) { build(Kind.TypeParameter) } } + if (this is PsiArrayType) { + node.append(getComponentType().build(Kind.TypeParameter), DocumentationReference.Kind.Detail) + } return node } @@ -155,7 +158,7 @@ public class JavaDocumentationBuilder() { is PsiPrimitiveType -> psiType.getCanonicalText().capitalize() is PsiClassType -> psiType.getClassName() is PsiEllipsisType -> mapTypeName(psiType.getComponentType()) - is PsiArrayType -> "Array<${mapTypeName(psiType.getComponentType())}>" + is PsiArrayType -> "Array" else -> psiType.getCanonicalText() } } diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt index e339f939..62728f45 100644 --- a/test/src/model/JavaTest.kt +++ b/test/src/model/JavaTest.kt @@ -64,9 +64,13 @@ public class JavaTest { Test fun arrayType() { verifyPackageMember("test/data/java/arrayType.java") { cls -> with(cls.members.single()) { - assertEquals("Array<String>", detail(DocumentationNode.Kind.Type).name) + val type = detail(DocumentationNode.Kind.Type) + assertEquals("Array", type.name) + assertEquals("String", type.detail(DocumentationNode.Kind.TypeParameter).name) with(details(DocumentationNode.Kind.Parameter).single()) { - assertEquals("Array<Int>", detail(DocumentationNode.Kind.Type).name) + val type = detail(DocumentationNode.Kind.Type) + assertEquals("Array", type.name) + assertEquals("Int", type.detail(DocumentationNode.Kind.TypeParameter).name) } } } |