class WhatEver {
@Inject
WhatEver(Provider<A> providerOfA ...) { ... }
}
Provider<A>
Yes, Providers are generated on the fly by guice.
--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/df1847bb-6125-434a-b00c-53614000aeb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
There are many different implementations depending on the scope
and the binding.
An incomplete list is:
- InjectorImpl.getProviderOrThrow()
- Scopes.SINGLETON
- ProviderLookup.getProvider()
- Providers.of()
- Providers.gucify()
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/2f4ed289-ed7c-458e-bce3-ba4e64994438%40googlegroups.com.
There are many different implementations depending on the scope and the binding.
In the end it doesn't matter which implementation is actually injected.
An incomplete list is:
- InjectorImpl.getProviderOrThrow()
- Scopes.SINGLETON
- ProviderLookup.getProvider()
- Providers.of()
- Providers.gucify()