withObject

fun <T : KoObjectProvider> List<T>.withObject(includeNested: Boolean = true, predicate: (KoObjectDeclaration) -> Boolean): List<T>

List containing declarations that have at least one object satisfying the provided predicate.

Return

A list containing declarations with at least one object satisfying the predicate.

Parameters

includeNested

Whether to include nested objects.

predicate

A function that defines the condition to be met by an object declaration.