model.documentableUtils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dokka-core Show documentation
Show all versions of dokka-core Show documentation
Dokka is an API documentation engine for Kotlin and Java, performing the same function as Javadoc for Java
package org.jetbrains.dokka.model
import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet
fun SourceSetDependent.filtered(sourceSets: Set) = filter { it.key in sourceSets }
fun DokkaSourceSet?.filtered(sourceSets: Set) = takeIf { this in sourceSets }
fun DTypeParameter.filter(filteredSet: Set) =
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
)
}
fun Documentable.isExtension() = this is Callable && receiver != null
© 2015 - 2025 Weber Informatics LLC | Privacy Policy