countObjects

abstract fun countObjects(includeNested: Boolean = true, predicate: (KoObjectDeclaration) -> Boolean): Int

Returns the number of objects that satisfies the specified predicate present in the declaration.

Return

The number of objects in the declaration.

Parameters

includeNested

Specifies whether to include nested objects in the count (optional, default is true).

predicate

The predicate function to determine if an object satisfies a condition.