KoClassProvider

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

Inheritors

Functions

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

The classes present in the declaration.

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

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

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

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

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

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

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

Determines whatever the declaration has classes.

Link copied to clipboard
abstract fun hasClassesWithAllNames(names: Collection<String>, includeNested: Boolean = true, includeLocal: Boolean = true): Boolean
abstract fun hasClassesWithAllNames(name: String, vararg names: String, includeNested: Boolean = true, includeLocal: Boolean = true): Boolean

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

Link copied to clipboard
abstract fun hasClassWithName(names: Collection<String>, includeNested: Boolean = true, includeLocal: Boolean = true): Boolean
abstract fun hasClassWithName(name: String, vararg names: String, includeNested: Boolean = true, includeLocal: Boolean = true): Boolean

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

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

Returns the number of classes present in the declaration.