withParents

fun <T : KoParentProvider> List<T>.withParents(indirectParents: Boolean = false): List<T>

List containing declarations with any parent.

Return

A list containing declarations with any parent.

Parameters

indirectParents

Whether to include indirect parents.


fun <T : KoParentProvider> List<T>.withParents(indirectParents: Boolean = false, predicate: (List<KoParentDeclaration>) -> Boolean): List<T>

List containing declarations with parent declarations satisfying the predicate.

Return

A list containing declarations with parent declarations satisfying the predicate.

Parameters

indirectParents

Whether to include indirect parents.

predicate

A function that defines the condition to be met by the list of parent declarations.