hasChild

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

Determines whether the declaration has at least one child defined directly in the Kotlin file that satisfies the provided predicate.

Return

true if there is a matching declaration, false otherwise.

Parameters

indirectChildren

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

predicate

A function that defines the condition to be met by a child declaration.