You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
360 B
Kotlin
13 lines
360 B
Kotlin
package me.eater.hefbrug.dsl.context.extension_util
|
|
|
|
import me.eater.hefbrug.definition.DefinitionFactory
|
|
|
|
object FactoryRegister {
|
|
private val map = mutableMapOf<String, DefinitionFactory<*, *, *>>()
|
|
|
|
operator fun plusAssign(factory: DefinitionFactory<*, *, *>) {
|
|
map[factory.id] = factory
|
|
}
|
|
|
|
operator fun get(id: String) = map[id]!!
|
|
} |