diff options
author | Sergey Mashkov <sergey.mashkov@jetbrains.com> | 2015-07-31 15:35:34 +0300 |
---|---|---|
committer | Sergey Mashkov <sergey.mashkov@jetbrains.com> | 2015-07-31 17:52:49 +0300 |
commit | e27fb69817b1417c1bc556a507b14f2700c7a736 (patch) | |
tree | b6d3b5622e65651ae6510f5109d86f834ff2c337 /javadoc/src/main/kotlin/dokka-adapters.kt | |
parent | 12f91ee7d491b21359ff8e8822c594f35b904def (diff) | |
download | dokka-e27fb69817b1417c1bc556a507b14f2700c7a736.tar.gz dokka-e27fb69817b1417c1bc556a507b14f2700c7a736.tar.bz2 dokka-e27fb69817b1417c1bc556a507b14f2700c7a736.zip |
Use Guice injector and ServiceLocator to load implementations on the fly
Diffstat (limited to 'javadoc/src/main/kotlin/dokka-adapters.kt')
-rw-r--r-- | javadoc/src/main/kotlin/dokka-adapters.kt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/javadoc/src/main/kotlin/dokka-adapters.kt b/javadoc/src/main/kotlin/dokka-adapters.kt new file mode 100644 index 00000000..c9183d50 --- /dev/null +++ b/javadoc/src/main/kotlin/dokka-adapters.kt @@ -0,0 +1,29 @@ +package org.jetbrains.dokka.javadoc + +import com.sun.tools.doclets.formats.html.HtmlDoclet +import org.jetbrains.dokka.* +import org.jetbrains.dokka.Formats.FormatDescriptor + +class JavadocGenerator(val conf: DokkaGenerator) : Generator { + override fun buildPages(nodes: Iterable<DocumentationNode>) { + val module = nodes.single() as DocumentationModule + + DokkaConsoleLogger.report() + HtmlDoclet.start(ModuleNodeAdapter(module, StandardReporter, conf.outputDir)) + } + + override fun buildOutlines(nodes: Iterable<DocumentationNode>) { + // no outline could be generated separately + } +} + +class JavadocFormatDescriptor : FormatDescriptor { + override val formatServiceClass: Class<out FormatService>? + get() = null + override val outlineServiceClass: Class<out OutlineFormatService>? + get() = null + + override val generatorServiceClass: Class<out Generator> + get() = javaClass<JavadocGenerator>() +} + |