aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/model/Documentable.kt
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-06-30 08:03:38 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-01 09:43:03 +0200
commita16e101fad10d024a84aa36069ec6032fcbaf3e6 (patch)
tree64e19695dccd67c3e1b1621eeac2ad469e01cb46 /core/src/main/kotlin/model/Documentable.kt
parent14e71e40dfab5f18ccd56b0c015383c0dfb5df51 (diff)
downloaddokka-a16e101fad10d024a84aa36069ec6032fcbaf3e6.tar.gz
dokka-a16e101fad10d024a84aa36069ec6032fcbaf3e6.tar.bz2
dokka-a16e101fad10d024a84aa36069ec6032fcbaf3e6.zip
Implement `AbstractJavadocTemplateMapTest` API
Diffstat (limited to 'core/src/main/kotlin/model/Documentable.kt')
-rw-r--r--core/src/main/kotlin/model/Documentable.kt14
1 files changed, 2 insertions, 12 deletions
diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt
index 35278302..21660f86 100644
--- a/core/src/main/kotlin/model/Documentable.kt
+++ b/core/src/main/kotlin/model/Documentable.kt
@@ -7,10 +7,9 @@ import org.jetbrains.dokka.model.properties.PropertyContainer
import org.jetbrains.dokka.model.properties.WithExtraProperties
-abstract class Documentable {
+abstract class Documentable : WithChildren<Documentable> {
abstract val name: String?
abstract val dri: DRI
- abstract val children: List<Documentable>
abstract val documentation: SourceSetDependent<DocumentationNode>
abstract val sourceSets: Set<DokkaSourceSet>
abstract val expectPresentInSet: DokkaSourceSet?
@@ -359,7 +358,7 @@ data class PrimitiveJavaType(val name: String) : Bound()
object Void : Bound()
object JavaObject : Bound()
object Dynamic : Bound()
-data class UnresolvedBound(val name: String): Bound()
+data class UnresolvedBound(val name: String) : Bound()
enum class FunctionModifiers {
NONE, FUNCTION, EXTENSION
@@ -376,15 +375,6 @@ fun Documentable.dfs(predicate: (Documentable) -> Boolean): Documentable? =
this.children.asSequence().mapNotNull { it.dfs(predicate) }.firstOrNull()
}
-fun Documentable.withDescendants(): Sequence<Documentable> {
- return sequence {
- yield(this@withDescendants)
- children.forEach { child ->
- yieldAll(child.withDescendants())
- }
- }
-}
-
sealed class Visibility(val name: String)
sealed class KotlinVisibility(name: String) : Visibility(name) {
object Public : KotlinVisibility("public")