Java


Javadoc

Uses a Javadoc doclet to produce a JSON format that Orchid can use to generate a documentation site.

Usage

// build.gradle.kts
repositories {
    jcenter()
}
dependencies {
    compile 'com.eden.kodiak:javadoc-runner:0.5.0'
}
var cacheDir: Path = Files.createTempDirectory("javadocCache")
val runner: JavadocInvoker = JavadocInvokerImpl(cacheDir)

val outputDir = File("build/javadoc").canonicalFile.toPath()
outputDir.toFile().deleteRecursively()
outputDir.toFile().mkdirs()

val rootDoc = runner.getRootDoc(
    listOf(
        File("src/main/java").canonicalFile.toPath()
    ),
    outputDir
) { inputStream -> IOStreamUtils.InputStreamPrinter(inputStream, null) }

rootDoc.packages.forEach { processPackage(it) }
rootDoc.classes.forEach { processClass(it) }
  • skip by including @suppress in its comments
    • classes
    • constructors
    • fields
    • methods

References

API Documentation: