aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/javadoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/javadoc')
-rw-r--r--core/src/main/kotlin/javadoc/dokka-adapters.kt32
1 files changed, 16 insertions, 16 deletions
diff --git a/core/src/main/kotlin/javadoc/dokka-adapters.kt b/core/src/main/kotlin/javadoc/dokka-adapters.kt
index c98a3801..1329876a 100644
--- a/core/src/main/kotlin/javadoc/dokka-adapters.kt
+++ b/core/src/main/kotlin/javadoc/dokka-adapters.kt
@@ -1,21 +1,22 @@
package org.jetbrains.dokka.javadoc
+import com.google.inject.Binder
import com.google.inject.Inject
import com.sun.tools.doclets.formats.html.HtmlDoclet
import org.jetbrains.dokka.*
+import org.jetbrains.dokka.Formats.DefaultAnalysisComponent
+import org.jetbrains.dokka.Formats.DefaultAnalysisComponentServices
import org.jetbrains.dokka.Formats.FormatDescriptor
-import org.jetbrains.dokka.Kotlin.KotlinAsJavaDescriptorSignatureProvider
-import org.jetbrains.dokka.Model.DescriptorSignatureProvider
-import org.jetbrains.dokka.Samples.DefaultSampleProcessingService
-import kotlin.reflect.KClass
+import org.jetbrains.dokka.Formats.KotlinAsJava
+import org.jetbrains.dokka.Utilities.bind
+import org.jetbrains.dokka.Utilities.toType
-class JavadocGenerator @Inject constructor(val options: DocumentationOptions, val logger: DokkaLogger) : Generator {
+class JavadocGenerator @Inject constructor(val configuration: DokkaConfiguration, val logger: DokkaLogger) : Generator {
override fun buildPages(nodes: Iterable<DocumentationNode>) {
val module = nodes.single() as DocumentationModule
- DokkaConsoleLogger.report()
- HtmlDoclet.start(ModuleNodeAdapter(module, StandardReporter(logger), options.outputDir))
+ HtmlDoclet.start(ModuleNodeAdapter(module, StandardReporter(logger), configuration.outputDir))
}
override fun buildOutlines(nodes: Iterable<DocumentationNode>) {
@@ -30,13 +31,12 @@ class JavadocGenerator @Inject constructor(val options: DocumentationOptions, va
}
}
-class JavadocFormatDescriptor : FormatDescriptor {
- override val formatServiceClass = null
- override val outlineServiceClass = null
- override val generatorServiceClass = JavadocGenerator::class
- override val packageDocumentationBuilderClass = KotlinAsJavaDocumentationBuilder::class
- override val javaDocumentationBuilderClass = JavaPsiDocumentationBuilder::class
- override val sampleProcessingService = DefaultSampleProcessingService::class
- override val packageListServiceClass: KClass<out PackageListService>? = null
- override val descriptorSignatureProvider = KotlinAsJavaDescriptorSignatureProvider::class
+class JavadocFormatDescriptor :
+ FormatDescriptor,
+ DefaultAnalysisComponent,
+ DefaultAnalysisComponentServices by KotlinAsJava {
+
+ override fun configureOutput(binder: Binder): Unit = with(binder) {
+ bind<Generator>() toType JavadocGenerator::class
+ }
}