compiler-plugin / arrow.meta.dsl.config / ConfigSyntax / storageComponent

storageComponent

open fun storageComponent(registerModuleComponents: CompilerContext.(container: StorageComponentContainer, moduleDescriptor: ModuleDescriptor) -> Unit, check: CompilerContext.(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) -> Unit = Noop.effect4): StorageComponentContainer

The storageComponent function allows access to the StorageComponentContributor. This is the Dependency Injector and service registry the compiler uses in all phases. In this function, you can register new services or modify existing ones before the container is composed and sealed prior to compilation.

RegisterModuleComponents enables a DSL using CompilerContext, and it can update the StorageComponentContainer and ModuleDescriptor to update the DI configuration of the compiler.

Do you like Arrow?

Arrow Org
<