aboutsummaryrefslogtreecommitdiff
path: root/src/Java/JavaDocumentationBuilder.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-10-21 18:26:10 +0200
committerDmitry Jemerov <yole@jetbrains.com>2015-10-21 18:26:10 +0200
commitb8f2435e2db50c2053a9d880ab9573cb0bc2630e (patch)
tree55274c5b5e67191e32983559ffb8ea15c0c4df86 /src/Java/JavaDocumentationBuilder.kt
parent8827d30048b9c50f47e62f69baf774363fdebc5d (diff)
downloaddokka-b8f2435e2db50c2053a9d880ab9573cb0bc2630e.tar.gz
dokka-b8f2435e2db50c2053a9d880ab9573cb0bc2630e.tar.bz2
dokka-b8f2435e2db50c2053a9d880ab9573cb0bc2630e.zip
M15 code cleanup
Diffstat (limited to 'src/Java/JavaDocumentationBuilder.kt')
-rw-r--r--src/Java/JavaDocumentationBuilder.kt12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt
index 1cd8d819..01ecb478 100644
--- a/src/Java/JavaDocumentationBuilder.kt
+++ b/src/Java/JavaDocumentationBuilder.kt
@@ -108,10 +108,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions,
}
private fun MutableContent.convertSeeTag(tag: PsiDocTag) {
- val linkElement = tag.linkElement()
- if (linkElement == null) {
- return
- }
+ val linkElement = tag.linkElement() ?: return
val seeSection = findSectionByTag("See Also") ?: addSection("See Also", null)
val linkSignature = resolveLink(linkElement)
val text = ContentText(linkElement.text)
@@ -192,7 +189,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions,
is PsiField -> element.containingClass!!.qualifiedName + "#" + element.name
is PsiMethod ->
element.containingClass!!.qualifiedName + "#" + element.name + "(" +
- element.parameterList.parameters.map { it.type.typeSignature() }.join(",") + ")"
+ element.parameterList.parameters.map { it.type.typeSignature() }.joinToString(",") + ")"
else -> null
}
@@ -341,10 +338,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions,
}
fun DocumentationNode.appendModifiers(element: PsiModifierListOwner) {
- val modifierList = element.modifierList
- if (modifierList == null) {
- return
- }
+ val modifierList = element.modifierList ?: return
PsiModifier.MODIFIERS.forEach {
if (it != "static" && modifierList.hasExplicitModifier(it)) {
appendTextNode(it, Kind.Modifier)