KoImportProvider

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

Inheritors

Properties

Link copied to clipboard

List of imports.

Link copied to clipboard
abstract val numImports: Int

The number of imports.

Functions

Link copied to clipboard
abstract fun countImports(predicate: (KoImportDeclaration) -> Boolean): Int

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

Link copied to clipboard
abstract fun hasAllImports(predicate: (KoImportDeclaration) -> Boolean): Boolean

Determines whatever the declaration has all imports with the specified predicate.

Link copied to clipboard
abstract fun hasImport(predicate: (KoImportDeclaration) -> Boolean): Boolean

Determines whatever the declaration has any import with the specified predicate.

Link copied to clipboard
abstract fun hasImports(): Boolean

Determines whatever the declaration has any import.

Link copied to clipboard
abstract fun hasImportsWithAllNames(name: String, vararg names: String): Boolean

Determines whether the declaration has imports with all the specified names.

Link copied to clipboard
abstract fun hasImportWithName(name: String, vararg names: String): Boolean

Determines whether the declaration has at least one import whose name matches any of the specified names.