countChildren

abstract fun countChildren(indirectChildren: Boolean = false, predicate: (KoChildDeclaration) -> Boolean): Int

Gets the number of children that satisfies the specified predicate present in the declaration.

Return

The number of children in the declaration satisfying predicate.

Parameters

indirectChildren

specifies whether to include children defined in other files such as child of the child.

predicate

The predicate function to determine if a child satisfies a condition.