aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-03-10 14:18:11 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-03-11 10:26:11 +0100
commit35851c4f00bde0b66ce1d9ae8ca02bab761df819 (patch)
treea10cfc7a71907a957e97dc498344ab324f70cc54 /core
parent35f56d1a1f38b6bc357e171dfa188962038a4a46 (diff)
downloaddokka-35851c4f00bde0b66ce1d9ae8ca02bab761df819.tar.gz
dokka-35851c4f00bde0b66ce1d9ae8ca02bab761df819.tar.bz2
dokka-35851c4f00bde0b66ce1d9ae8ca02bab761df819.zip
Remove nested packages from packages
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/model/Documentable.kt13
1 files changed, 4 insertions, 9 deletions
diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt
index d073d39a..8ff5969c 100644
--- a/core/src/main/kotlin/model/Documentable.kt
+++ b/core/src/main/kotlin/model/Documentable.kt
@@ -59,10 +59,6 @@ interface WithScope {
val classlikes: List<Classlike>
}
-interface WithPackages {
- val packages: List<Package>
-}
-
interface WithVisibility {
val visibility: PlatformDependent<Visibility>
}
@@ -114,11 +110,11 @@ abstract class Classlike : Documentable(), WithScope, WithVisibility, WithExpect
data class Module(
override val name: String,
- override val packages: List<Package>,
+ val packages: List<Package>,
override val documentation: PlatformDependent<DocumentationNode>,
override val platformData: List<PlatformData>,
override val extra: PropertyContainer<Module> = PropertyContainer.empty()
-) : Documentable(), WithPackages, WithExtraProperties<Module> {
+) : Documentable(), WithExtraProperties<Module> {
override val dri: DRI = DRI.topLevel
override val children: List<Documentable>
get() = packages
@@ -131,14 +127,13 @@ data class Package(
override val functions: List<Function>,
override val properties: List<Property>,
override val classlikes: List<Classlike>,
- override val packages: List<Package>,
override val documentation: PlatformDependent<DocumentationNode>,
override val platformData: List<PlatformData>,
override val extra: PropertyContainer<Package> = PropertyContainer.empty()
-) : Documentable(), WithScope, WithPackages, WithExtraProperties<Package> {
+) : Documentable(), WithScope, WithExtraProperties<Package> {
override val name = dri.packageName.orEmpty()
override val children: List<Documentable>
- get() = (properties + functions + classlikes + packages) as List<Documentable>
+ get() = (properties + functions + classlikes) as List<Documentable>
override fun withNewExtras(newExtras: PropertyContainer<Package>) = copy(extra = newExtras)
}