has Child With Name
abstract fun hasChildWithName(name: String, vararg names: String, indirectChildren: Boolean = false): Boolean
Determines whether the declaration has at least one child defined directly in the Kotlin file whose name matches any of the specified names.
Return
true
if there is a matching declaration, false
otherwise.
Parameters
name
the name of the child to check.
names
the names of the children to check.
indirect Children
specifies whether to include children defined in other files such as child of the child.
abstract fun hasChildWithName(names: Collection<String>, indirectChildren: Boolean = false): Boolean
Determines whether the declaration has at least one child defined directly in the Kotlin file whose name matches any of the specified names.
Return
true
if there is a matching declaration, false
otherwise.
Parameters
names
the names of the children to check.
indirect Children
specifies whether to include children defined in other files such as child of the child.