diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2019-10-31 15:26:20 +0100 |
---|---|---|
committer | Paweł Marks <pmarks@virtuslab.com> | 2019-10-31 15:26:20 +0100 |
commit | 50111daf07c7afd1c1b60e9672ed6786c96efdea (patch) | |
tree | 0b4420c2dc74b48c6cea577421d3fbfd3b18d95b /core/src/main/kotlin/Formats | |
parent | 7c30624e3d0868346823b15b5cea5e29a56357f2 (diff) | |
download | dokka-50111daf07c7afd1c1b60e9672ed6786c96efdea.tar.gz dokka-50111daf07c7afd1c1b60e9672ed6786c96efdea.tar.bz2 dokka-50111daf07c7afd1c1b60e9672ed6786c96efdea.zip |
Make things compile, no matter the cost
Diffstat (limited to 'core/src/main/kotlin/Formats')
-rw-r--r-- | core/src/main/kotlin/Formats/AnalysisComponents.kt | 45 | ||||
-rw-r--r-- | core/src/main/kotlin/Formats/FormatDescriptor.kt | 43 |
2 files changed, 0 insertions, 88 deletions
diff --git a/core/src/main/kotlin/Formats/AnalysisComponents.kt b/core/src/main/kotlin/Formats/AnalysisComponents.kt deleted file mode 100644 index d78d4a0c..00000000 --- a/core/src/main/kotlin/Formats/AnalysisComponents.kt +++ /dev/null @@ -1,45 +0,0 @@ -package org.jetbrains.dokka.Formats - -import com.google.inject.Binder -import org.jetbrains.dokka.* -import org.jetbrains.dokka.KotlinAsJavaElementSignatureProvider -import org.jetbrains.dokka.KotlinElementSignatureProvider -import org.jetbrains.dokka.ElementSignatureProvider -import org.jetbrains.dokka.Samples.DefaultSampleProcessingService -import org.jetbrains.dokka.Samples.SampleProcessingService -import org.jetbrains.dokka.Utilities.bind -import org.jetbrains.dokka.Utilities.toType -import kotlin.reflect.KClass - - -interface DefaultAnalysisComponentServices { - val packageDocumentationBuilderClass: KClass<out PackageDocumentationBuilder> - val javaDocumentationBuilderClass: KClass<out JavaDocumentationBuilder> - val sampleProcessingService: KClass<out SampleProcessingService> - val elementSignatureProvider: KClass<out ElementSignatureProvider> -} - -interface DefaultAnalysisComponent : FormatDescriptorAnalysisComponent, DefaultAnalysisComponentServices { - override fun configureAnalysis(binder: Binder): Unit = with(binder) { - bind<ElementSignatureProvider>() toType elementSignatureProvider - bind<PackageDocumentationBuilder>() toType packageDocumentationBuilderClass - bind<JavaDocumentationBuilder>() toType javaDocumentationBuilderClass - bind<SampleProcessingService>() toType sampleProcessingService - } -} - - -object KotlinAsJava : DefaultAnalysisComponentServices { - override val packageDocumentationBuilderClass = KotlinAsJavaDocumentationBuilder::class - override val javaDocumentationBuilderClass = JavaPsiDocumentationBuilder::class - override val sampleProcessingService = DefaultSampleProcessingService::class - override val elementSignatureProvider = KotlinAsJavaElementSignatureProvider::class -} - - -object KotlinAsKotlin : DefaultAnalysisComponentServices { - override val packageDocumentationBuilderClass = KotlinPackageDocumentationBuilder::class - override val javaDocumentationBuilderClass = KotlinJavaDocumentationBuilder::class - override val sampleProcessingService = DefaultSampleProcessingService::class - override val elementSignatureProvider = KotlinElementSignatureProvider::class -}
\ No newline at end of file diff --git a/core/src/main/kotlin/Formats/FormatDescriptor.kt b/core/src/main/kotlin/Formats/FormatDescriptor.kt deleted file mode 100644 index 4bac8aa0..00000000 --- a/core/src/main/kotlin/Formats/FormatDescriptor.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.jetbrains.dokka.Formats - -import com.google.inject.Binder -import org.jetbrains.dokka.* -import org.jetbrains.dokka.Utilities.bind -import org.jetbrains.dokka.Utilities.lazyBind -import org.jetbrains.dokka.Utilities.toOptional -import org.jetbrains.dokka.Utilities.toType -import kotlin.reflect.KClass - - -interface FormatDescriptorAnalysisComponent { - fun configureAnalysis(binder: Binder) -} - -interface FormatDescriptorOutputComponent { - fun configureOutput(binder: Binder) -} - -interface FormatDescriptor : FormatDescriptorAnalysisComponent, FormatDescriptorOutputComponent - - -abstract class FileGeneratorBasedFormatDescriptor : FormatDescriptor { - - override fun configureOutput(binder: Binder): Unit = with(binder) { - bind<Generator>() toType NodeLocationAwareGenerator::class - bind<NodeLocationAwareGenerator>() toType generatorServiceClass - bind(generatorServiceClass.java) // https://github.com/google/guice/issues/847 - - bind<LanguageService>() toType languageServiceClass - - lazyBind<OutlineFormatService>() toOptional (outlineServiceClass) - lazyBind<FormatService>() toOptional formatServiceClass - lazyBind<PackageListService>() toOptional packageListServiceClass - } - - abstract val formatServiceClass: KClass<out FormatService>? - abstract val outlineServiceClass: KClass<out OutlineFormatService>? - abstract val generatorServiceClass: KClass<out FileGenerator> - abstract val packageListServiceClass: KClass<out PackageListService>? - - open val languageServiceClass: KClass<out LanguageService> = KotlinLanguageService::class -}
\ No newline at end of file |