KoParentProvider

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

Inheritors

Functions

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

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

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

Determines whether the declaration has all parents (parent classes and parent interfaces) that satisfy the provided predicate.

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

Determines whether the declaration has parents with all the specified KClass type.

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

Determines whether the declaration has at least one parent (parent class or parent interface) that satisfies the provided predicate.

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

Determines whether the declaration has at least one parent of the specified KClass type.

Link copied to clipboard

Returns true if declaration represents the type of T.

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

Determines whatever declaration has any parent (parent class and parent interfaces).

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

Determines whether the declaration has parents (parent classes and parent interfaces) with all the specified names.

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

Determines whether the declaration has at least one parent (parent class and parent interfaces) whose name matches any of the specified names.

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

Returns the number of parents.

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

The parents (parent class and parent interfaces) of the declaration.