Package-level declarations

Types

Link copied to clipboard
annotation class ComponentScan(val value: String = [])

Gather definitions declared with Koin definition annotation. Will scan in current package or with the explicit packages names. For scan current package use empty value array or empty string.

Link copied to clipboard
annotation class Configuration(val value: String = [])

To be applied on @Module class to be associated to a Configuration

Link copied to clipboard
annotation class Factory(val binds: Array<KClass<*>> = [Unit::class])

Koin definition annotation Declare a type, a function as factory definition in Koin

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class KoinApplication(val configurations: Array<String> = [], val modules: Array<KClass<*>> = [Unit::class])

Tag a class as a Koin application entry point: helps generate Koin application boostrap, with startKoin or koinApplication function. This also, looks at configurations to scan modules

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Module(val includes: Array<KClass<*>> = [], val createdAtStart: Boolean = false)

Class annotation, to help gather definitions inside a Koin module. Each function can be annotated with a Koin definition annotation, to declare it

Link copied to clipboard
annotation class Monitor

Marks a class or function for automatic monitoring and performance tracing through Kotzilla Platform, the official tooling platform for Koin.

Link copied to clipboard
annotation class Named(val value: String = "", val type: KClass<*> = Unit::class)

Define a qualifier for a given definition (associated with Koin definition annotation) Will generate StringQualifier("...")

Link copied to clipboard
annotation class Property(val value: String)

Annotate a constructor parameter or function parameter, to resolve as Koin property

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FIELD])
annotation class PropertyValue(val value: String)

Annotate a field value that will be Property default value

Link copied to clipboard
annotation class Qualifier(val value: KClass<*> = Unit::class, val name: String = "")

Define a qualifier for a given definition (associated with Koin definition annotation) Will generate StringQualifier("...")

Link copied to clipboard
annotation class Scope(val value: KClass<*> = Unit::class, val name: String = "")

Declare a class in a Koin scope. Scope name is described by either value (class) or name (string) By default, will declare a scoped definition. Can also override with @Scoped, @Factory, @KoinViewModel annotations to add explicit bindings

Link copied to clipboard
annotation class Scoped(val binds: Array<KClass<*>> = [Unit::class])

Declare a type, a function as scoped definition in Koin. Must be associated with @Scope annotation

Link copied to clipboard
annotation class ScopeId(val value: KClass<*> = Unit::class, val name: String = "")

Annotate a parameter from class constructor or function, to ask resolution for given scope with Scope Id

Link copied to clipboard
annotation class Single(val binds: Array<KClass<*>> = [Unit::class], val createdAtStart: Boolean = false)

Koin definition annotation Declare a type, a function as single definition in Koin

Link copied to clipboard
annotation class Singleton(val binds: Array<KClass<*>> = [Unit::class], val createdAtStart: Boolean = false)

same as @Single

Link copied to clipboard

Declare a class in a ViewModelScope Koin scope.