KoDeclarationProvider

An interface representing a Kotlin declaration that provides information about declarations.

Inheritors

Functions

Link copied to clipboard
abstract fun countDeclarations(includeNested: Boolean = true, includeLocal: Boolean = true, predicate: (KoBaseDeclaration) -> Boolean): Int

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

Link copied to clipboard
abstract fun declarations(includeNested: Boolean = true, includeLocal: Boolean = true): List<KoBaseDeclaration>

The declarations present in the declaration.

Link copied to clipboard
inline fun <T : KoBaseProvider> KoDeclarationProvider.declarationsOf(includeNested: Boolean = true, includeLocal: Boolean = true): List<T>

The declarations of type T present in the declaration.

Link copied to clipboard
abstract fun hasAllDeclarations(includeNested: Boolean = true, includeLocal: Boolean = true, predicate: (KoBaseDeclaration) -> Boolean): Boolean

Determines whether the declaration has all declarations that satisfy the provided predicate.

Link copied to clipboard
abstract fun hasDeclaration(includeNested: Boolean = true, includeLocal: Boolean = true, predicate: (KoBaseDeclaration) -> Boolean): Boolean

Determines whether the declaration has at least one declaration that satisfies the provided predicate.

Link copied to clipboard
abstract fun hasDeclarations(includeNested: Boolean = true, includeLocal: Boolean = true): Boolean

Determines whatever the declaration has declarations.

Link copied to clipboard
abstract fun numDeclarations(includeNested: Boolean = true, includeLocal: Boolean = true): Int

Returns the number of declarations present in the declaration.

Link copied to clipboard
abstract fun numInternalDeclarations(includeNested: Boolean = true, includeLocal: Boolean = true): Int

Returns the number of declarations with internal visibility modifier present in the declaration.

Link copied to clipboard
abstract fun numPrivateDeclarations(includeNested: Boolean = true, includeLocal: Boolean = true): Int

Returns the number of declarations with private visibility modifier present in the declaration.

Link copied to clipboard
abstract fun numProtectedDeclarations(includeNested: Boolean = true, includeLocal: Boolean = true): Int

Returns the number of declarations with protected visibility modifier present in the declaration.

Link copied to clipboard
abstract fun numPublicDeclarations(includeNested: Boolean = true, includeLocal: Boolean = true): Int

Returns the number of declarations with public visibility modifier present in the declaration.

Link copied to clipboard
abstract fun numPublicOrDefaultDeclarations(includeNested: Boolean = true, includeLocal: Boolean = true): Int

Returns the number of declarations with public or default visibility modifier present in the declaration.