From a046b198645811fe1b7db129942505c379aabb03 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Tue, 17 Dec 2024 23:07:06 +0100 Subject: feat: Add name prefetching --- src/main/kotlin/moe/nea/ledger/utils/di/DIProvider.kt | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/kotlin/moe/nea/ledger/utils/di/DIProvider.kt') diff --git a/src/main/kotlin/moe/nea/ledger/utils/di/DIProvider.kt b/src/main/kotlin/moe/nea/ledger/utils/di/DIProvider.kt index b5ce550..bd5b9ef 100644 --- a/src/main/kotlin/moe/nea/ledger/utils/di/DIProvider.kt +++ b/src/main/kotlin/moe/nea/ledger/utils/di/DIProvider.kt @@ -24,6 +24,7 @@ fun interface DIProvider : BaseDIProvider { ?: clazz.constructors.find { it.parameterCount == 0 } ?: error("Could not find DI injection entrypoint for class $clazz")) as Constructor + // TODO: consider using unsafe init to inject the parameters *before* calling the constructor return DIProvider { di -> val typArgs = cons.parameters.map { di.provide(it.type, it) -- cgit