aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2015-07-09 17:45:52 +0200
committerDmitry Jemerov <intelliyole@gmail.com>2015-07-09 17:45:52 +0200
commit68caff40cfce97bba23f505ec7db33a0d406e709 (patch)
treefa09c8bb187a46a0a1eacd2d722ab6209935e24e
parent3921ac60ee89bbd02444f85e8b8b52c7f77c6e27 (diff)
parent2f3bd214b78c99d06e4dac9e7ff474fd8f0d7ec5 (diff)
downloaddokka-68caff40cfce97bba23f505ec7db33a0d406e709.tar.gz
dokka-68caff40cfce97bba23f505ec7db33a0d406e709.tar.bz2
dokka-68caff40cfce97bba23f505ec7db33a0d406e709.zip
Merge pull request #26 from bintree/master
Fix project after types enhancement from annotations
-rw-r--r--src/Java/JavaDocumentationBuilder.kt4
-rw-r--r--src/Kotlin/ContentBuilder.kt2
-rw-r--r--src/Kotlin/DocumentationBuilder.kt4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt
index 466ba304..fdd385fb 100644
--- a/src/Java/JavaDocumentationBuilder.kt
+++ b/src/Java/JavaDocumentationBuilder.kt
@@ -189,9 +189,9 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions,
private fun getSignature(element: PsiElement?) = when(element) {
is PsiClass -> element.getQualifiedName()
- is PsiField -> element.getContainingClass().getQualifiedName() + "#" + element.getName()
+ is PsiField -> element.getContainingClass()!!.getQualifiedName() + "#" + element.getName()
is PsiMethod ->
- element.getContainingClass().getQualifiedName() + "#" + element.getName() + "(" +
+ element.getContainingClass()!!.getQualifiedName() + "#" + element.getName() + "(" +
element.getParameterList().getParameters().map { it.getType().typeSignature() }.join(",") + ")"
else -> null
}
diff --git a/src/Kotlin/ContentBuilder.kt b/src/Kotlin/ContentBuilder.kt
index 2bf960a6..273009ab 100644
--- a/src/Kotlin/ContentBuilder.kt
+++ b/src/Kotlin/ContentBuilder.kt
@@ -139,7 +139,7 @@ fun DocumentationBuilder.functionBody(descriptor: DeclarationDescriptor, functio
val bodyExpression = psiElement.getBodyExpression()
when (bodyExpression) {
is JetBlockExpression -> bodyExpression.getText().removeSurrounding("{", "}")
- else -> bodyExpression.getText()
+ else -> bodyExpression!!.getText()
}
}
else -> psiElement.getText()
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt
index 8bbd7743..bea2f6fa 100644
--- a/src/Kotlin/DocumentationBuilder.kt
+++ b/src/Kotlin/DocumentationBuilder.kt
@@ -115,7 +115,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade,
}
fun DeclarationDescriptor.isDeprecated(): Boolean = getAnnotations().any {
- DescriptorUtils.getFqName(it.getType().getConstructor().getDeclarationDescriptor()).asString() == "kotlin.deprecated"
+ DescriptorUtils.getFqName(it.getType().getConstructor().getDeclarationDescriptor()!!).asString() == "kotlin.deprecated"
} || (this is ConstructorDescriptor && getContainingDeclaration().isDeprecated())
fun DeclarationDescriptor.signature(): String = when(this) {
@@ -664,7 +664,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade,
}
fun ReceiverParameterDescriptor.build(): DocumentationNode {
- var receiverClass: DeclarationDescriptor = getType().getConstructor().getDeclarationDescriptor()
+ var receiverClass: DeclarationDescriptor = getType().getConstructor().getDeclarationDescriptor()!!
if ((receiverClass as? ClassDescriptor)?.isCompanionObject() ?: false) {
receiverClass = receiverClass.getContainingDeclaration()!!
}