The question is probably more understandable with an example.
I am using Guice
to create injector:
val injector = Guice.createInjector(new Module)
with the following Module class:
class Module extends AbstractModule {
override def configure(): Unit = {
val instance = aCallToGetAnInstance()
bind(classOf[DummyClass]).toInstance(instance)
bind(classOf[DummyClass2]).asEagerSingleton()
}
@Provides
@Singleton
def provideDummyService: DummyService = {
DummyService.standard.build()
}
}
Which of these 3 bound classes would be bound first?
This question seems to make sense if one of the following calls inject one of the other class.
Thanks for your answers.
guice
, I updated the question thanks for your feedback ;) – Axel Borja