aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationSource.kt
blob: 9514adb4afaa35c670560c585d3f4e71d6fee30a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package org.jetbrains.dokka.base.parsers.moduleAndPackage

import java.io.File

abstract class ModuleAndPackageDocumentationSource {
    abstract val sourceDescription: String
    abstract val documentation: String
    override fun toString(): String = sourceDescription
}

internal data class ModuleAndPackageDocumentationFile(private val file: File) : ModuleAndPackageDocumentationSource() {
    override val sourceDescription: String = file.path
    override val documentation: String by lazy(LazyThreadSafetyMode.PUBLICATION) { file.readText() }
}