I'm trying to figure out if this is possible but I think I'm looking in the wrong places.
I want to add some syntactic sugar to Guice so that we have AutoService interfaces on our objects that have start / stop methods.
This way I can create a normal Guice binding, create my injector, and then I can have my 'app' call start() in one place which starts all the services.
This way I can have a basic injector to just test bindings, then in production start() my app which will connect to databases, open large files, etc.
The problem I'm having is I need a handle on every instance of a new object guice creeates.
I thought I could do this via BindListener but I only get the class, not that actual instance that was created.
I'm sure I'm just looking in the wrong place so some advice would be super helpful...