KoChildProvider

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

Inheritors

Functions

Link copied to clipboard
abstract fun children(indirectChildren: Boolean = false): List<KoChildDeclaration>

The children of the declaration.

Link copied to clipboard
abstract fun countChildren(indirectChildren: Boolean = false, predicate: (KoChildDeclaration) -> Boolean): Int

Gets the number of children that satisfies the specified predicate present in the declaration.

Link copied to clipboard
abstract fun hasAllChildren(indirectChildren: Boolean = false, predicate: (KoChildDeclaration) -> Boolean): Boolean

Determines whether the declaration has all children defined directly in the Kotlin file that satisfy the provided predicate.

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

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

Link copied to clipboard
abstract fun hasChild(indirectChildren: Boolean = false, predicate: (KoChildDeclaration) -> Boolean): Boolean

Determines whether the declaration has at least one child defined directly in the Kotlin file that satisfies the provided predicate.

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

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

Link copied to clipboard
abstract fun hasChildren(indirectChildren: Boolean = false): Boolean

Whatever declaration has any child defined directly in the Kotlin file.

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

Determines whether the declaration has children defined directly in the Kotlin file with all the specified names.

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

Link copied to clipboard
abstract fun numChildren(indirectChildren: Boolean = false): Int

The number of children.