Sergey Mashkov | e27fb69 | 2015-07-31 15:35:34 +0300 | [diff] [blame^] | 1 | package org.jetbrains.dokka.javadoc |
| 2 | |
| 3 | import com.sun.tools.doclets.formats.html.HtmlDoclet |
| 4 | import org.jetbrains.dokka.* |
| 5 | import org.jetbrains.dokka.Formats.FormatDescriptor |
| 6 | |
| 7 | class 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 | |
| 20 | class 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 | |