Guice with ServiceTracker feature like OSGi

2015-02-10 Thread Karsten Schulz
Hello guys, i have a handling question about guice. i like really dependency injection and use this in the most of private projects. But currently i have some problems with generics and multiple binding for one interface. For the first problem i have another solution. i don't know if thats

Re: Guice with ServiceTracker feature like OSGi

2015-02-10 Thread Nate Bauernfeind
Couple of comments. 1. Resolving generic type dependencies can be done without named annotations. The trick is to use a Guice TypeLiteral. See: http://google.github.io/guice/api-docs/latest/javadoc/index.html?com/google/inject/TypeLiteral.html Your bind becomes something more like: bind(new