aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/model/documentableUtils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/model/documentableUtils.kt')
-rw-r--r--core/src/main/kotlin/model/documentableUtils.kt27
1 files changed, 0 insertions, 27 deletions
diff --git a/core/src/main/kotlin/model/documentableUtils.kt b/core/src/main/kotlin/model/documentableUtils.kt
deleted file mode 100644
index c9d75bf4..00000000
--- a/core/src/main/kotlin/model/documentableUtils.kt
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
- */
-
-package org.jetbrains.dokka.model
-
-import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet
-
-public fun <T> SourceSetDependent<T>.filtered(sourceSets: Set<DokkaSourceSet>): SourceSetDependent<T> = filter { it.key in sourceSets }
-public fun DokkaSourceSet?.filtered(sourceSets: Set<DokkaSourceSet>): DokkaSourceSet? = takeIf { this in sourceSets }
-
-public fun DTypeParameter.filter(filteredSet: Set<DokkaSourceSet>): DTypeParameter? =
- if (filteredSet.containsAll(sourceSets)) this
- else {
- val intersection = filteredSet.intersect(sourceSets)
- if (intersection.isEmpty()) null
- else DTypeParameter(
- variantTypeParameter,
- documentation.filtered(intersection),
- expectPresentInSet?.takeIf { intersection.contains(expectPresentInSet) },
- bounds,
- intersection,
- extra
- )
- }
-
-public fun Documentable.isExtension(): Boolean = this is Callable && receiver != null