hasParentClassWithName

abstract fun hasParentClassWithName(name: String, vararg names: String, indirectParents: Boolean = false): Boolean

Determines whether the declaration has a parent class whose name matches any of the specified names. If indirectParents is set to true, it verifies if there's at least one parent class that matches.

Return

true if there is a matching declaration, false otherwise.

Parameters

name

the name of the parent class to check.

names

the names of the parent classes to check.

indirectParents

specifies whether to include parent classes defined in other files such as parent of the parent.


abstract fun hasParentClassWithName(names: Collection<String>, indirectParents: Boolean = false): Boolean

Determines whether the declaration has a parent class whose name matches any of the specified names. If indirectParents is set to true, it verifies if there's at least one parent class that matches.

Return

true if there is a matching declaration, false otherwise.

Parameters

names

the names of the parent classes to check.

indirectParents

specifies whether to include parent classes defined in other files such as parent of the parent.