KoExternalDeclaration

Represents a Kotlin external declaration - declaration which is not defined in the project (e.g. defined in the library). it may be a class, interface or object.

Properties

Link copied to clipboard
abstract val fullyQualifiedName: String?

Fully qualified name of the declaration.

Link copied to clipboard
abstract val name: String

Name of the declaration.

Link copied to clipboard

Package of the declaration.

Link copied to clipboard
abstract val text: String

Text of the declaration.

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 hasNameContaining(text: String): Boolean

Name of the declaration containing text.

Link copied to clipboard
abstract fun hasNameEndingWith(suffix: String): Boolean

Name of the declaration with suffix.

Link copied to clipboard
abstract fun hasNameMatching(regex: Regex): Boolean

Name of the declaration matching regex.

Link copied to clipboard
abstract fun hasNameStartingWith(prefix: String): Boolean

Name of the declaration with prefix.

Link copied to clipboard
abstract fun hasTextContaining(str: String): Boolean

Text of the declaration containing text.

Link copied to clipboard
abstract fun hasTextEndingWith(suffix: String): Boolean

Text of the declaration with suffix.

Link copied to clipboard
abstract fun hasTextMatching(regex: Regex): Boolean

Text of the declaration matching regex.

Link copied to clipboard
abstract fun hasTextStartingWith(prefix: String): Boolean

Text of the declaration with prefix.

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

The number of children.

Link copied to clipboard
abstract fun resideInPackage(name: String): Boolean

Determines whatever the declaration resides in a package.

Link copied to clipboard
abstract fun resideOutsidePackage(name: String): Boolean

Determines whatever the declaration resides outside a package.