GenerateGenericKoinDefinition

@Target(allowedTargets = [AnnotationTarget.FILE])
annotation class GenerateGenericKoinDefinition(val name: String, val nullable: Boolean = true, val generateSingle: Boolean = true, val generateFactory: Boolean = true)

Use this annotation to mark files near to which generator should place generated extensions for koin org.koin.core.scope.Scope and org.koin.core.Koin

Parameters

name

Name for definitions. This name will be available as extension for org.koin.core.scope.Scope and org.koin.core.Koin

type

Type of extensions. It is base star-typed class

typeArgs

Generic types for type. For example, if type == Something::class and typeArgs == G1::class, G2::class, the result type will be Something<G1, G2>

nullable

In case when true, extension will not throw error when definition has not been registered in koin

generateSingle

Generate definition factory with org.koin.core.module.Module.single. You will be able to use the extension org.koin.core.module.Module.nameSingle(createdAtStart/* default false /) { / your definition */ }

generateFactory

Generate definition factory with org.koin.core.module.Module.factory. You will be able to use the extension org.koin.core.module.Module.nameFactory { /* your definition */ }

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val nullable: Boolean = true