diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/utils')
-rw-r--r-- | src/main/kotlin/moe/nea/ledger/utils/DI.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/utils/DI.kt b/src/main/kotlin/moe/nea/ledger/utils/DI.kt index 1114127..abd6272 100644 --- a/src/main/kotlin/moe/nea/ledger/utils/DI.kt +++ b/src/main/kotlin/moe/nea/ledger/utils/DI.kt @@ -31,6 +31,8 @@ class DI { return internalProvide<T, Any>(type, element) } + inline fun <reified T : Any> provide(): T = provide(T::class.java) + fun <T : Any> register(type: Class<T>, provider: BaseDIProvider<T, *>) { providers[type] = provider } |