You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose to provide some facility to get all the (currently private Provider<T>) providers that a component has via some sort of API / Set-Injection / whatever is idiomatic... The background is that while I ❤️ how Dagger 2 operates, it's a bit hard to bridge into dynamic frameworks.
Case in point: Jersey 2 (in Dropwizard) with Dagger 2:
Dropwizard doesn't prescribe any DI, so Dagger 2 is just perfect, however there's JAX-RS (implemented by Jersey) from which you typically want to reach out into your own Dagger powered (business) logic
Jersey 2 uses HK2: Now that leads JAX-RS resource-classes being treated by HK2/Jersey (which knows about awesome (dynamic runtime) things like HTTP-Headers with @Context) but of course not about Dagger-managed stuff
However it would be pretty easy to give HK2 knowledge about Dagger 2 Providers via e.g. Jersey's AbstractBinder as demonstrated in this Gist
I think that #413 is really about a similar thing (I'm not a Guice guy). My Spring is not 100% up-to-date but programmatically getting this into the ApplicationContext isn't difficult either.
But we'd need programmatic access to the Provider's somehow -- and they are all in (or reachable through) the Component implementations (at least as far as I can observe in my generated code). And I honestly believe this should not require another separately versioned generator like Bullet.
Caveat: I have no idea how much work this is 😄
I'd like to propose to provide some facility to get all the (currently
private Provider<T>) providers that a component has via some sort of API / Set-Injection / whatever is idiomatic... The background is that while I ❤️ how Dagger 2 operates, it's a bit hard to bridge into dynamic frameworks.Case in point: Jersey 2 (in Dropwizard) with Dagger 2:
I think that #413 is really about a similar thing (I'm not a Guice guy). My Spring is not 100% up-to-date but programmatically getting this into the ApplicationContext isn't difficult either.
But we'd need programmatic access to the Provider's somehow -- and they are all in (or reachable through) the Component implementations (at least as far as I can observe in my generated code). And I honestly believe this should not require another separately versioned generator like Bullet.