diff options
Diffstat (limited to 'src/Java/JavaPsiDocumentationBuilder.kt')
-rw-r--r-- | src/Java/JavaPsiDocumentationBuilder.kt | 21 |
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 |