aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/javadoc/docbase.kt
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-10-29 18:45:33 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-10-29 18:46:41 +0300
commitb9fa0e0741bfdfa76c3929e5343a2b19d96fc1ff (patch)
tree09a07123c9c6437333f9faad7f4e1c2154aa07f2 /core/src/main/kotlin/javadoc/docbase.kt
parent8f32ef92be19c88f1a26d3ce19f77c9e1d053d8d (diff)
downloaddokka-b9fa0e0741bfdfa76c3929e5343a2b19d96fc1ff.tar.gz
dokka-b9fa0e0741bfdfa76c3929e5343a2b19d96fc1ff.tar.bz2
dokka-b9fa0e0741bfdfa76c3929e5343a2b19d96fc1ff.zip
#361: Fix varargs
Fix #361
Diffstat (limited to 'core/src/main/kotlin/javadoc/docbase.kt')
-rw-r--r--core/src/main/kotlin/javadoc/docbase.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/kotlin/javadoc/docbase.kt b/core/src/main/kotlin/javadoc/docbase.kt
index 2a14c6ff..61b13b46 100644
--- a/core/src/main/kotlin/javadoc/docbase.kt
+++ b/core/src/main/kotlin/javadoc/docbase.kt
@@ -173,7 +173,7 @@ open class TypeAdapter(override val module: ModuleNodeAdapter, override val node
private val javaLanguageService = JavaLanguageService()
override fun qualifiedTypeName(): String = javaLanguageService.getArrayElementType(node)?.qualifiedNameFromType() ?: node.qualifiedNameFromType()
- override fun typeName(): String = javaLanguageService.getArrayElementType(node)?.simpleName() ?: node.simpleName()
+ override fun typeName(): String = (javaLanguageService.getArrayElementType(node)?.simpleName() ?: node.simpleName()) + dimension()
override fun simpleTypeName(): String = typeName() // TODO difference typeName() vs simpleTypeName()
override fun dimension(): String = Collections.nCopies(javaLanguageService.getArrayDimension(node), "[]").joinToString("")
@@ -275,7 +275,7 @@ class ParameterizedTypeAdapter(module: ModuleNodeAdapter, node: DocumentationNod
}
class ParameterAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : DocumentationNodeAdapter(module, node), Parameter {
- override fun typeName(): String? = JavaLanguageService().renderType(node.detail(NodeKind.Type))
+ override fun typeName(): String? = type()?.typeName()
override fun type(): Type? = TypeAdapter(module, node.detail(NodeKind.Type))
override fun annotations(): Array<out AnnotationDesc> = nodeAnnotations(this).toTypedArray()
}
@@ -317,7 +317,7 @@ open class ExecutableMemberAdapter(module: ModuleNodeAdapter, node: Documentatio
.map { ThrowsTagAdapter(this, ClassDocumentationNodeAdapter(module, classOf(it.subjectName!!, NodeKind.Exception)), it.children) }
.toTypedArray()
- override fun isVarArgs(): Boolean = node.details(NodeKind.Parameter).any { false } // TODO
+ override fun isVarArgs(): Boolean = node.details(NodeKind.Parameter).last().hasModifier("vararg")
override fun isSynchronized(): Boolean = node.annotations.any { it.name == "synchronized" }