aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/javadoc/dokka-adapters.kt
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-02-22 15:47:06 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-02-22 15:47:06 +0300
commit3278122d5fd72efc03bd8339865c7d3c19582e8d (patch)
tree241cc9898798cce43257041691dfe26c6c4565ba /core/src/main/kotlin/javadoc/dokka-adapters.kt
parent0a09b1bffb45eceb3f53296207b8b03715cc345b (diff)
parentec3d364e49268f1dfbc7619245ec36a49e780169 (diff)
downloaddokka-3278122d5fd72efc03bd8339865c7d3c19582e8d.tar.gz
dokka-3278122d5fd72efc03bd8339865c7d3c19582e8d.tar.bz2
dokka-3278122d5fd72efc03bd8339865c7d3c19582e8d.zip
Merge branch 'refactoring-layout-service' into dev
Diffstat (limited to 'core/src/main/kotlin/javadoc/dokka-adapters.kt')
-rw-r--r--core/src/main/kotlin/javadoc/dokka-adapters.kt26
1 files changed, 12 insertions, 14 deletions
diff --git a/core/src/main/kotlin/javadoc/dokka-adapters.kt b/core/src/main/kotlin/javadoc/dokka-adapters.kt
index c98a3801..4676db18 100644
--- a/core/src/main/kotlin/javadoc/dokka-adapters.kt
+++ b/core/src/main/kotlin/javadoc/dokka-adapters.kt
@@ -1,13 +1,12 @@
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.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.*
+import org.jetbrains.dokka.Utilities.bind
+import org.jetbrains.dokka.Utilities.toType
class JavadocGenerator @Inject constructor(val options: DocumentationOptions, val logger: DokkaLogger) : Generator {
@@ -30,13 +29,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
+ }
}