hasParentClassOf

abstract fun hasParentClassOf(name: KClass<*>, vararg names: KClass<*>, indirectParents: Boolean = false): Boolean

Determines whether the declaration has a parent class of the specified Kotlin class. 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 KClass type of the parent class to check.

names

the KClass types 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 hasParentClassOf(names: Collection<KClass<*>>, indirectParents: Boolean = false): Boolean

Determines whether the declaration has a parent class of the specified Kotlin class. 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 KClass types of the parent classes to check.

indirectParents

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