#Dagger 2 with plain old Java

1 messages · Page 1 of 1 (latest)

slim sundial
#

I am trying to understand scopes in Dagger 2 using plain ole java (non-android).

I have a project which requires a singleton scope and then some more generic scopes.

Extremely basic overview:
I have RaspberryPi pins which are singletons and these singletons need to interact with more generic scoped dependencies like "Instruments" or "Sensors".

I am having trouble visualizing how to lay out my dependencies and get them to interact between scopes. The Dagger 2 documentation seems not too helpful and I have been stuck on this for a few weeks.

I have experience with Google Juice, Koin, and Spring DI, but I have a runtime performance requirement which requires me to use pre-generated DI (Dagger 2).

Is there anyone here with real experience and/or examples of Dagger 2 outside of Android?

lusty caveBOT
#

This post has been reserved for your question.

Hey @slim sundial! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.