KoParentClassProvider

An interface representing a Kotlin declaration that provides access to its parent class.

Inheritors

Properties

Link copied to clipboard

The direct parent class of the declaration.

Functions

Link copied to clipboard
abstract fun countParentClasses(indirectParents: Boolean = false, predicate: (KoParentDeclaration) -> Boolean): Int

Returns the number of parent classes that satisfies the specified predicate present in the declaration.

Link copied to clipboard
abstract fun hasAllParentClasses(indirectParents: Boolean = false, predicate: (KoParentDeclaration) -> Boolean): Boolean

Determines whether the declaration has all parent classes that satisfy the provided predicate.

Link copied to clipboard
abstract fun hasAllParentClassesOf(names: Collection<KClass<*>>, indirectParents: Boolean = false): Boolean
abstract fun hasAllParentClassesOf(name: KClass<*>, vararg names: KClass<*>, indirectParents: Boolean = false): Boolean

Determines whether the declaration has parent classes with all the specified KClass type.

Link copied to clipboard
abstract fun hasParentClass(): Boolean

Determines whether declaration has a direct parent class.

abstract fun hasParentClass(indirectParents: Boolean = false, predicate: (KoParentDeclaration) -> Boolean): Boolean

Determines whether the declaration has a specified parent class. If indirectParents is set to true, it verifies if there's at least one parent class that satisfies the provided predicate.

Link copied to clipboard
abstract fun hasParentClasses(indirectParents: Boolean = false): Boolean

Determines whatever declaration has any parent class.

Link copied to clipboard
abstract fun hasParentClassesWithAllNames(names: Collection<String>, indirectParents: Boolean = false): Boolean
abstract fun hasParentClassesWithAllNames(name: String, vararg names: String, indirectParents: Boolean = false): Boolean

Determines whether the declaration has parent classes with all the specified names.

Link copied to clipboard
abstract fun hasParentClassOf(names: Collection<KClass<*>>, indirectParents: Boolean = false): Boolean
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.

Link copied to clipboard

Returns true if declaration represents the type of T.

Link copied to clipboard
abstract fun hasParentClassWithName(names: Collection<String>, indirectParents: Boolean = false): Boolean
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.

Link copied to clipboard
abstract fun numParentClasses(indirectParents: Boolean = false): Int

Returns the number of parent classes.

Link copied to clipboard
abstract fun parentClasses(indirectParents: Boolean = false): List<KoParentDeclaration>

The parent classes of the declaration.