All Downloads are FREE. Search and download functionalities are using the official Maven repository.

model.documentableUtils.kt Maven / Gradle / Ivy

Go to download

Dokka is an API documentation engine for Kotlin and Java, performing the same function as Javadoc for Java

There is a newer version: 2.0.0
Show newest version
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
        )
    }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy