aboutsummaryrefslogtreecommitdiff
path: root/src/Formats/StandardFormats.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-11-04 16:26:07 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-11-04 16:26:07 +0100
commit84ea5c68420a75c7b8401000dbe6dbf3ff2cd6d0 (patch)
treee2f655042a05a5ce0b5ed3b111824afdcbc28ded /src/Formats/StandardFormats.kt
parent3655b706ea22ab9d7ee02a8d5074aa583e848018 (diff)
downloaddokka-84ea5c68420a75c7b8401000dbe6dbf3ff2cd6d0.tar.gz
dokka-84ea5c68420a75c7b8401000dbe6dbf3ff2cd6d0.tar.bz2
dokka-84ea5c68420a75c7b8401000dbe6dbf3ff2cd6d0.zip
@Inject all the things
Diffstat (limited to 'src/Formats/StandardFormats.kt')
-rw-r--r--src/Formats/StandardFormats.kt69
1 files changed, 24 insertions, 45 deletions
diff --git a/src/Formats/StandardFormats.kt b/src/Formats/StandardFormats.kt
index 12b5d85d..94e1b115 100644
--- a/src/Formats/StandardFormats.kt
+++ b/src/Formats/StandardFormats.kt
@@ -2,58 +2,37 @@ package org.jetbrains.dokka.Formats
import org.jetbrains.dokka.*
-class HtmlFormatDescriptor : FormatDescriptor {
- override val formatServiceClass: Class<out FormatService>
- get() = HtmlFormatService::class.java
+abstract class KotlinFormatDescriptorBase : FormatDescriptor {
+ override val packageDocumentationBuilderClass = KotlinPackageDocumentationBuilder::class
+ override val javaDocumentationBuilderClass = KotlinJavaDocumentationBuilder::class
- override val outlineServiceClass: Class<out OutlineFormatService>
- get() = HtmlFormatService::class.java
-
- override val generatorServiceClass: Class<out Generator>
- get() = FileGenerator::class.java
-
- override val packageDocumentationBuilderServiceClass: Class<out PackageDocumentationBuilder>?
- get() = null
+ override val generatorServiceClass = FileGenerator::class
}
-class KotlinWebsiteFormatDescriptor : FormatDescriptor {
- override val formatServiceClass: Class<out FormatService>
- get() = KotlinWebsiteFormatService::class.java
-
- override val outlineServiceClass: Class<out OutlineFormatService>
- get() = YamlOutlineService::class.java
-
- override val generatorServiceClass: Class<out Generator>
- get() = FileGenerator::class.java
-
- override val packageDocumentationBuilderServiceClass: Class<out PackageDocumentationBuilder>?
- get() = null
+class HtmlFormatDescriptor : KotlinFormatDescriptorBase() {
+ override val formatServiceClass = HtmlFormatService::class
+ override val outlineServiceClass = HtmlFormatService::class
}
-class JekyllFormatDescriptor : FormatDescriptor {
- override val formatServiceClass: Class<out FormatService>
- get() = JekyllFormatService::class.java
-
- override val outlineServiceClass: Class<out OutlineFormatService>?
- get() = null
-
- override val generatorServiceClass: Class<out Generator>
- get() = FileGenerator::class.java
-
- override val packageDocumentationBuilderServiceClass: Class<out PackageDocumentationBuilder>?
- get() = null
+class HtmlAsJavaFormatDescriptor : FormatDescriptor {
+ override val formatServiceClass = HtmlFormatService::class
+ override val outlineServiceClass = HtmlFormatService::class
+ override val generatorServiceClass = FileGenerator::class
+ override val packageDocumentationBuilderClass = KotlinAsJavaDocumentationBuilder::class
+ override val javaDocumentationBuilderClass = JavaPsiDocumentationBuilder::class
}
-class MarkdownFormatDescriptor : FormatDescriptor {
- override val formatServiceClass: Class<out FormatService>
- get() = MarkdownFormatService::class.java
-
- override val outlineServiceClass: Class<out OutlineFormatService>?
- get() = null
+class KotlinWebsiteFormatDescriptor : KotlinFormatDescriptorBase() {
+ override val formatServiceClass = KotlinWebsiteFormatService::class
+ override val outlineServiceClass = YamlOutlineService::class
+}
- override val generatorServiceClass: Class<out Generator>
- get() = FileGenerator::class.java
+class JekyllFormatDescriptor : KotlinFormatDescriptorBase() {
+ override val formatServiceClass = JekyllFormatService::class
+ override val outlineServiceClass = null
+}
- override val packageDocumentationBuilderServiceClass: Class<out PackageDocumentationBuilder>?
- get() = null
+class MarkdownFormatDescriptor : KotlinFormatDescriptorBase() {
+ override val formatServiceClass = MarkdownFormatService::class
+ override val outlineServiceClass = null
}