KoDeclarationCastProvider

An interface representing a Kotlin declaration that provides the information associated with this declaration.

Inheritors

Properties

Link copied to clipboard
abstract val isClass: Boolean

Determines whatever declaration is a class.

Link copied to clipboard

Determines whatever declaration is a class or an interface.

Link copied to clipboard

Determines whatever declaration is a class, an interface or an object.

Link copied to clipboard
abstract val isClassOrObject: Boolean

Determines whatever declaration is a class or an object.

Link copied to clipboard
abstract val isExternal: Boolean

Determines whatever declaration is an external. An external declaration refers to a declaration that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard
abstract val isExternalType: Boolean

Determines whatever source declaration is an external type. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard
abstract val isFunction: Boolean

Determines whatever declaration is a function.

Link copied to clipboard
abstract val isImportAlias: Boolean

Determines whatever declaration is import alias.

Link copied to clipboard
abstract val isInterface: Boolean

Determines whatever declaration is an interface.

Link copied to clipboard

Determines whatever declaration is an interface or an object.

Link copied to clipboard

Determines whatever declaration is a Kotlin stdlib basic type Basic types

Link copied to clipboard

Determines whatever declaration is a Kotlin stdlib Collection type Collections overview.

Link copied to clipboard
abstract val isKotlinType: Boolean

Determines whatever declaration is a build in Kotlin type. It can be a basic Kotlin type Basic types or collection type Collections overview (https://kotlinlang.org/docs/collections-overview.html#collection).

Link copied to clipboard
abstract val isObject: Boolean

Determines whatever declaration is an object.

Link copied to clipboard
abstract val isProperty: Boolean

Determines whatever declaration is a property.

Link copied to clipboard

Determines whether the source declaration is a star projection. A star projection is a placeholder that represents any type in a generic context, allowing for flexible type constraints.

Link copied to clipboard
abstract val isTypeAlias: Boolean

Determines whatever declaration is a type alias.

Link copied to clipboard
abstract val isTypeParameter: Boolean

Determines whatever declaration is a type parameter.

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

Represents the class declaration associated with this declaration.

Link copied to clipboard

Represents the class or interface declaration associated with this declaration.

Link copied to clipboard

Represents the class, interface or object declaration associated with this declaration.

Link copied to clipboard

Represents the class or object declaration associated with this declaration.

Link copied to clipboard

Represents the external declaration associated with this declaration. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard

Represents the external declaration associated with this declaration. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard

Represents the function declaration associated with this declaration.

Link copied to clipboard

Represents the import alias declaration associated with this declaration.

Link copied to clipboard

Represents the interface declaration associated with this declaration.

Link copied to clipboard

Represents the interface or object declaration associated with this declaration.

Link copied to clipboard

Represents the Kotlin basic type declaration associated with this declaration.

Link copied to clipboard

Represents the Kotlin collection type declaration associated with this declaration.

Link copied to clipboard

Represents the Kotlin type declaration associated with this declaration.

Link copied to clipboard

Represents the object declaration associated with this declaration.

Link copied to clipboard

Represents the property declaration associated with this declaration.

Link copied to clipboard

Represents the declaration alias declaration associated with this declaration.

Link copied to clipboard

Represents the declaration parameter declaration associated with this declaration.

Link copied to clipboard
abstract fun hasClassDeclaration(predicate: (KoClassDeclaration) -> Boolean? = null): Boolean

Whether declaration has a specified class declaration.

Link copied to clipboard
abstract fun hasClassDeclarationOf(kClass: KClass<*>): Boolean

Whether declaration has a class declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified class or interface declaration.

Link copied to clipboard

Whether declaration has a class or an interface declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified class, interface or object declaration.

Link copied to clipboard

Whether declaration has a class, an interface or an object declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified class or object declaration.

Link copied to clipboard
abstract fun hasClassOrObjectDeclarationOf(kClass: KClass<*>): Boolean

Whether declaration has a class or an object declaration of the specified Kotlin class.

Link copied to clipboard
abstract fun hasExternalDeclaration(predicate: (KoExternalDeclaration) -> Boolean? = null): Boolean

Whether declaration has a specified external type declaration. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard
abstract fun hasExternalDeclarationOf(kClass: KClass<*>): Boolean

Whether declaration has a external type declaration of the specified Kotlin class. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard
abstract fun hasExternalTypeDeclaration(predicate: (KoExternalDeclaration) -> Boolean? = null): Boolean

Whether type has a specified external type declaration. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard
abstract fun hasExternalTypeDeclarationOf(kClass: KClass<*>): Boolean

Whether type has a external type declaration of the specified Kotlin class. An external type refers to a type that is defined outside the project's codebase. for e.g. in external library.

Link copied to clipboard
abstract fun hasFunctionDeclaration(predicate: (KoFunctionDeclaration) -> Boolean? = null): Boolean

Whether declaration has a specified function declaration.

Link copied to clipboard
abstract fun hasFunctionDeclarationOf(kClass: KClass<*>): Boolean

Whether declaration has a function declaration of the specified Kotlin function.

Link copied to clipboard
abstract fun hasImportAliasDeclaration(predicate: (KoImportAliasDeclaration) -> Boolean? = null): Boolean

Whether declaration has a specified import alias declaration.

Link copied to clipboard
abstract fun hasInterfaceDeclaration(predicate: (KoInterfaceDeclaration) -> Boolean? = null): Boolean

Whether declaration has a specified interface declaration.

Link copied to clipboard
abstract fun hasInterfaceDeclarationOf(kClass: KClass<*>): Boolean

Whether declaration has an interface declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified interface or object declaration.

Link copied to clipboard

Whether declaration has an interface or an object declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified kotlin basic type declaration.

Link copied to clipboard

Whether declaration has a kotlin basic type declaration of the specified Kotlin class.

Link copied to clipboard

Whether declaration has a specified kotlin collection type declaration.

Link copied to clipboard

Whether declaration has a kotlin collection type declaration of the specified Kotlin class.

Link copied to clipboard
abstract fun hasKotlinTypeDeclaration(predicate: (KoKotlinTypeDeclaration) -> Boolean? = null): Boolean

Whether declaration has a specified kotlin type declaration.

Link copied to clipboard
abstract fun hasKotlinTypeDeclarationOf(kClass: KClass<*>): Boolean

Whether declaration has a kotlin type declaration of the specified Kotlin class.

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 hasObjectDeclaration(predicate: (KoObjectDeclaration) -> Boolean? = null): Boolean

Whether declaration has a specified object declaration.

Link copied to clipboard
abstract fun hasObjectDeclarationOf(kClass: KClass<*>): Boolean

Whether declaration has a object declaration of the specified Kotlin class.

Link copied to clipboard
abstract fun hasPropertyDeclaration(predicate: (KoPropertyDeclaration) -> Boolean? = null): Boolean

Whether declaration has a specified property declaration.

Link copied to clipboard
abstract fun hasPropertyDeclarationOf(kClass: KClass<*>): Boolean

Whether declaration has a property declaration of the specified Kotlin property.

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 hasTypeAliasDeclaration(predicate: (KoTypeAliasDeclaration) -> Boolean? = null): Boolean

Whether declaration has a specified type alias declaration.

Link copied to clipboard

Whether declaration has a specified type parameter declaration.