diff options
Diffstat (limited to 'core/src/main/kotlin/Java')
-rw-r--r-- | core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt index c16e66c6..67bf1f08 100644 --- a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt +++ b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt @@ -2,6 +2,7 @@ package org.jetbrains.dokka import com.google.inject.Inject import com.intellij.psi.* +import com.intellij.psi.util.InheritanceUtil fun getSignature(element: PsiElement?) = when(element) { is PsiClass -> element.qualifiedName @@ -141,6 +142,7 @@ class JavaPsiDocumentationBuilder : JavaDocumentationBuilder { isInterface -> NodeKind.Interface isEnum -> NodeKind.Enum isAnnotationType -> NodeKind.AnnotationClass + isException() -> NodeKind.Exception else -> NodeKind.Class } val node = nodeForElement(this, kind) @@ -159,6 +161,8 @@ class JavaPsiDocumentationBuilder : JavaDocumentationBuilder { return node } + fun PsiClass.isException() = InheritanceUtil.isInheritor(this, "java.lang.Throwable") + fun ignoreSupertype(psiType: PsiClassType): Boolean = psiType.isClass("java.lang.Enum") || psiType.isClass("java.lang.Object") |