blob: c9183d506522d3b2f29562a94612140dba2bcc48 [file] [log] [blame]
Sergey Mashkove27fb692015-07-31 15:35:34 +03001package org.jetbrains.dokka.javadoc
2
3import com.sun.tools.doclets.formats.html.HtmlDoclet
4import org.jetbrains.dokka.*
5import org.jetbrains.dokka.Formats.FormatDescriptor
6
7class JavadocGenerator(val conf: DokkaGenerator) : Generator {
8 override fun buildPages(nodes: Iterable<DocumentationNode>) {
9 val module = nodes.single() as DocumentationModule
10
11 DokkaConsoleLogger.report()
12 HtmlDoclet.start(ModuleNodeAdapter(module, StandardReporter, conf.outputDir))
13 }
14
15 override fun buildOutlines(nodes: Iterable<DocumentationNode>) {
16 // no outline could be generated separately
17 }
18}
19
20class JavadocFormatDescriptor : FormatDescriptor {
21 override val formatServiceClass: Class<out FormatService>?
22 get() = null
23 override val outlineServiceClass: Class<out OutlineFormatService>?
24 get() = null
25
26 override val generatorServiceClass: Class<out Generator>
27 get() = javaClass<JavadocGenerator>()
28}
29