KoSourceDeclaration

Represents a source declaration in the Kotlin codebase.

A source declaration refers to the underlying object or entity being referenced in the source code. For example, in an import statement like import com.samplepackage.SampleClass, the source declaration would be the SampleClass instance itself, providing access to its properties, name, type, and other relevant information.

Inheritors

Properties

Link copied to clipboard
abstract val name: String

Name of the declaration.

Link copied to clipboard
abstract val text: String

Text of the declaration.

Functions

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 override fun toString(): String

String representing the declaration.