I have a few classes that from my client code I need to call. Right now I have a list and then the client has to check the list for the implementation. It is a mess to use.
object Adapter {
val list = listOf(
A(),
B()
...
)
}
Ideally I would only keep one implementation in memory, but sometimes I need to change between implementations.