KoClassAndObjectProvider

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

Inheritors

Functions

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

The classes and objects present in the declaration.

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

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

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

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

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

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

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

Determines whatever the declaration has classes and objects.

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

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

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

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

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

Returns the number of classes and objects present in the declaration.