aboutsummaryrefslogtreecommitdiff
path: root/src/Java/JavaPsiDocumentationBuilder.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-11-04 16:26:07 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-11-04 16:26:07 +0100
commit84ea5c68420a75c7b8401000dbe6dbf3ff2cd6d0 (patch)
treee2f655042a05a5ce0b5ed3b111824afdcbc28ded /src/Java/JavaPsiDocumentationBuilder.kt
parent3655b706ea22ab9d7ee02a8d5074aa583e848018 (diff)
downloaddokka-84ea5c68420a75c7b8401000dbe6dbf3ff2cd6d0.tar.gz
dokka-84ea5c68420a75c7b8401000dbe6dbf3ff2cd6d0.tar.bz2
dokka-84ea5c68420a75c7b8401000dbe6dbf3ff2cd6d0.zip
@Inject all the things
Diffstat (limited to 'src/Java/JavaPsiDocumentationBuilder.kt')
-rw-r--r--src/Java/JavaPsiDocumentationBuilder.kt21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/Java/JavaPsiDocumentationBuilder.kt b/src/Java/JavaPsiDocumentationBuilder.kt
index b1e3167d..44270bc7 100644
--- a/src/Java/JavaPsiDocumentationBuilder.kt
+++ b/src/Java/JavaPsiDocumentationBuilder.kt
@@ -1,5 +1,6 @@
package org.jetbrains.dokka
+import com.google.inject.Inject
import com.intellij.psi.*
import org.jetbrains.dokka.DocumentationNode.Kind
@@ -29,9 +30,23 @@ interface JavaDocumentationBuilder {
fun appendFile(file: PsiJavaFile, module: DocumentationModule, packageContent: Map<String, Content>)
}
-class JavaPsiDocumentationBuilder(private val options: DocumentationOptions,
- private val refGraph: NodeReferenceGraph,
- private val docParser: JavaDocumentationParser = JavadocParser(refGraph)) : JavaDocumentationBuilder {
+class JavaPsiDocumentationBuilder : JavaDocumentationBuilder {
+ private val options: DocumentationOptions
+ private val refGraph: NodeReferenceGraph
+ private val docParser: JavaDocumentationParser
+
+ @Inject constructor(options: DocumentationOptions, refGraph: NodeReferenceGraph) {
+ this.options = options
+ this.refGraph = refGraph
+ this.docParser = JavadocParser(refGraph)
+ }
+
+ constructor(options: DocumentationOptions, refGraph: NodeReferenceGraph, docParser: JavaDocumentationParser) {
+ this.options = options
+ this.refGraph = refGraph
+ this.docParser = docParser
+ }
+
override fun appendFile(file: PsiJavaFile, module: DocumentationModule, packageContent: Map<String, Content>) {
if (file.classes.all { skipElement(it) }) {
return