aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/javadoc
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-04-29 15:29:16 +0200
committerDmitry Jemerov <yole@jetbrains.com>2016-04-29 15:29:16 +0200
commit3356187ba8742cb987ca2c7bd543e2890bcedf29 (patch)
treee253b56b5ac180535caf4d77160b33593f9770bf /core/src/main/kotlin/javadoc
parentad8af9c7d489026bbab66c1e79e9e2c3ffb694be (diff)
downloaddokka-3356187ba8742cb987ca2c7bd543e2890bcedf29.tar.gz
dokka-3356187ba8742cb987ca2c7bd543e2890bcedf29.tar.bz2
dokka-3356187ba8742cb987ca2c7bd543e2890bcedf29.zip
don't report type parameters for array classes; don't report qualified names for stdlib types such as java.lang.String
Diffstat (limited to 'core/src/main/kotlin/javadoc')
-rw-r--r--core/src/main/kotlin/javadoc/docbase.kt10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/src/main/kotlin/javadoc/docbase.kt b/core/src/main/kotlin/javadoc/docbase.kt
index 795ba84a..20d74088 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)?.name ?: node.name
+ override fun typeName(): String = javaLanguageService.getArrayElementType(node)?.simpleName() ?: node.simpleName()
override fun simpleTypeName(): String = typeName() // TODO difference typeName() vs simpleTypeName()
override fun dimension(): String = Collections.nCopies(javaLanguageService.getArrayDimension(node), "[]").joinToString("")
@@ -194,8 +194,10 @@ open class TypeAdapter(override val module: ModuleNodeAdapter, override val node
override fun asTypeVariable(): TypeVariable? = if (node.kind == NodeKind.TypeParameter) TypeVariableAdapter(module, node) else null
override fun asParameterizedType(): ParameterizedType? =
- if (node.details(NodeKind.Type).isNotEmpty()) ParameterizedTypeAdapter(module, node)
- else null // TODO it should ignore dimensions
+ if (node.details(NodeKind.Type).isNotEmpty() && javaLanguageService.getArrayElementType(node) == null)
+ ParameterizedTypeAdapter(module, node)
+ else
+ null
override fun asAnnotationTypeDoc(): AnnotationTypeDoc? = if (node.kind == NodeKind.AnnotationClass) AnnotationTypeDocAdapter(module, node) else null
override fun asAnnotatedType(): AnnotatedType? = if (node.annotations.isNotEmpty()) AnnotatedTypeAdapter(module, node) else null
@@ -389,7 +391,7 @@ open class ClassDocumentationNodeAdapter(module: ModuleNodeAdapter, val classNod
if (parent?.kind in NodeKind.classLike) {
return parent!!.name + "." + classNode.name
}
- return classNode.name
+ return classNode.simpleName()
}
override fun constructors(filter: Boolean): Array<out ConstructorDoc> = classNode.members(NodeKind.Constructor).map { ConstructorAdapter(module, it) }.toTypedArray()