From 84ea5c68420a75c7b8401000dbe6dbf3ff2cd6d0 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 4 Nov 2015 16:26:07 +0100 Subject: @Inject all the things --- javadoc/src/main/kotlin/dokka-adapters.kt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'javadoc/src') diff --git a/javadoc/src/main/kotlin/dokka-adapters.kt b/javadoc/src/main/kotlin/dokka-adapters.kt index a863faf7..00b73cae 100644 --- a/javadoc/src/main/kotlin/dokka-adapters.kt +++ b/javadoc/src/main/kotlin/dokka-adapters.kt @@ -5,12 +5,12 @@ import com.sun.tools.doclets.formats.html.HtmlDoclet import org.jetbrains.dokka.* import org.jetbrains.dokka.Formats.FormatDescriptor -class JavadocGenerator @Inject constructor (val conf: DokkaGenerator) : Generator { +class JavadocGenerator @Inject constructor (val options: DocumentationOptions, val logger: DokkaLogger) : Generator { override fun buildPages(nodes: Iterable) { val module = nodes.single() as DocumentationModule DokkaConsoleLogger.report() - HtmlDoclet.start(ModuleNodeAdapter(module, StandardReporter(conf.logger), conf.outputDir)) + HtmlDoclet.start(ModuleNodeAdapter(module, StandardReporter(logger), options.outputDir)) } override fun buildOutlines(nodes: Iterable) { @@ -19,14 +19,9 @@ class JavadocGenerator @Inject constructor (val conf: DokkaGenerator) : Generato } class JavadocFormatDescriptor : FormatDescriptor { - override val formatServiceClass: Class? - get() = null - override val outlineServiceClass: Class? - get() = null - - override val generatorServiceClass: Class - get() = JavadocGenerator::class.java - - override val packageDocumentationBuilderServiceClass: Class? - get() = KotlinAsJavaDocumentationBuilder::class.java + override val formatServiceClass = null + override val outlineServiceClass = null + override val generatorServiceClass = JavadocGenerator::class + override val packageDocumentationBuilderClass = KotlinAsJavaDocumentationBuilder::class + override val javaDocumentationBuilderClass = JavaPsiDocumentationBuilder::class } -- cgit