aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/javadoc/dokka-adapters.kt
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-12-02 04:29:07 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-12-02 04:29:07 +0300
commitc1abcaf32abd4e2d74b9246385b3541096cdb5b9 (patch)
treecdfa6753f5922186c7fd77824003e04ea1dd3d10 /core/src/main/kotlin/javadoc/dokka-adapters.kt
parentf08f711a4290b47149ae3454d698e78c9f4c8e16 (diff)
downloaddokka-c1abcaf32abd4e2d74b9246385b3541096cdb5b9.tar.gz
dokka-c1abcaf32abd4e2d74b9246385b3541096cdb5b9.tar.bz2
dokka-c1abcaf32abd4e2d74b9246385b3541096cdb5b9.zip
Extract Analysis components out of FormatDescriptor
Fight with statically injected HtmlTemplateService
Diffstat (limited to 'core/src/main/kotlin/javadoc/dokka-adapters.kt')
-rw-r--r--core/src/main/kotlin/javadoc/dokka-adapters.kt13
1 files changed, 3 insertions, 10 deletions
diff --git a/core/src/main/kotlin/javadoc/dokka-adapters.kt b/core/src/main/kotlin/javadoc/dokka-adapters.kt
index 84dff8f0..bed211f6 100644
--- a/core/src/main/kotlin/javadoc/dokka-adapters.kt
+++ b/core/src/main/kotlin/javadoc/dokka-adapters.kt
@@ -5,13 +5,10 @@ import com.google.inject.Inject
import com.sun.tools.doclets.formats.html.HtmlDoclet
import org.jetbrains.dokka.*
import org.jetbrains.dokka.Formats.FormatDescriptor
-import org.jetbrains.dokka.Formats.FormatDescriptorAnalysisComponentProvider
-import org.jetbrains.dokka.Kotlin.KotlinAsJavaDescriptorSignatureProvider
-import org.jetbrains.dokka.Model.DescriptorSignatureProvider
-import org.jetbrains.dokka.Samples.DefaultSampleProcessingService
+import org.jetbrains.dokka.Formats.FormatDescriptorAnalysisComponent
+import org.jetbrains.dokka.Formats.KotlinAsJava
import org.jetbrains.dokka.Utilities.bind
import org.jetbrains.dokka.Utilities.toType
-import kotlin.reflect.KClass
class JavadocGenerator @Inject constructor(val options: DocumentationOptions, val logger: DokkaLogger) : Generator {
@@ -34,11 +31,7 @@ class JavadocGenerator @Inject constructor(val options: DocumentationOptions, va
}
}
-class JavadocFormatDescriptor : FormatDescriptor, FormatDescriptorAnalysisComponentProvider {
- override val packageDocumentationBuilderClass = KotlinAsJavaDocumentationBuilder::class
- override val javaDocumentationBuilderClass = JavaPsiDocumentationBuilder::class
- override val sampleProcessingService = DefaultSampleProcessingService::class
- override val descriptorSignatureProvider = KotlinAsJavaDescriptorSignatureProvider::class
+class JavadocFormatDescriptor : FormatDescriptor, FormatDescriptorAnalysisComponent by KotlinAsJava {
override fun configureOutput(binder: Binder): Unit = with(binder) {
bind<Generator>() toType JavadocGenerator::class