aboutsummaryrefslogtreecommitdiff
path: root/javadoc/src/main/kotlin
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-11-04 21:20:15 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-11-04 21:20:15 +0100
commit449a61cd6c46f196855cdb9375593fb04b38709a (patch)
treecab7a556dd0e8ff62ef07075a2f4f02cf80ebbb3 /javadoc/src/main/kotlin
parent970af572c55f5535485f955f2219a94f73e696d4 (diff)
downloaddokka-449a61cd6c46f196855cdb9375593fb04b38709a.tar.gz
dokka-449a61cd6c46f196855cdb9375593fb04b38709a.tar.bz2
dokka-449a61cd6c46f196855cdb9375593fb04b38709a.zip
revert array handling
Diffstat (limited to 'javadoc/src/main/kotlin')
-rw-r--r--javadoc/src/main/kotlin/docbase.kt10
1 files changed, 4 insertions, 6 deletions
diff --git a/javadoc/src/main/kotlin/docbase.kt b/javadoc/src/main/kotlin/docbase.kt
index 8f90edfc..22db0a09 100644
--- a/javadoc/src/main/kotlin/docbase.kt
+++ b/javadoc/src/main/kotlin/docbase.kt
@@ -171,16 +171,14 @@ open class TypeAdapter(override val module: ModuleNodeAdapter, override val node
override fun simpleTypeName(): String = typeName() // TODO difference typeName() vs simpleTypeName()
override fun dimension(): String = Collections.nCopies(javaLanguageService.getArrayDimension(node), "[]").joinToString("")
- override fun isPrimitive(): Boolean = node.name in setOf("Int", "Long", "Short", "Byte", "Char", "Double", "Float", "Boolean", "Unit")
+ override fun isPrimitive(): Boolean = simpleTypeName() in setOf("int", "long", "short", "byte", "char", "double", "float", "boolean", "void")
+
override fun asClassDoc(): ClassDoc? = if (isPrimitive) null else
elementType?.asClassDoc() ?:
when (node.kind) {
- DocumentationNode.Kind.Class,
+ in DocumentationNode.Kind.classLike,
DocumentationNode.Kind.ExternalClass,
- DocumentationNode.Kind.Interface,
- DocumentationNode.Kind.Object,
- DocumentationNode.Kind.Exception,
- DocumentationNode.Kind.Enum -> ClassDocumentationNodeAdapter(module, node)
+ DocumentationNode.Kind.Exception -> ClassDocumentationNodeAdapter(module, node)
else -> when {
node.links.isNotEmpty() -> TypeAdapter(module, node.links.first()).asClassDoc()