I’m not sure if I’m following your idea, but I think we might be talking about different things. Guice manages run time dependencies within the application itself. It sounds like maybe you’re thinking about compile-time dependencies, is that right? The latter might be managed by something like gradle.

Guice actually runs inside the application. It provides an object called an injector which you can use, for instance, when instantiating objects to get the dependencies needed for construction of that object. So, for example, when calling new BatchManager, I might call something like injector.getInstance(HeartbeatActor.class) and pass that in as a constructor argument.

Software Engineer since 2007 ・ Parent ・ Mediocre Runner ・ Tree Enthusiast ・ Crappy Wood Worker ・ he/him or they/them

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store