Can I Inject x Class?

2018-06-20 Thread Joe DeSantis
I was working with a JUnit 5 extension for Guice, and we had the need to determine if a particular class was able to be injected by an injector. The only solution we came up with is attempting to get an instance with that Injector. (Literally calling the getInstance method, in a try/catch

Re: Dynamic binding inference

2018-06-20 Thread Stephan Classen
I guess then you are on your own. I don't think Guice provide such a feature out of the box. You could write a custom Module which reads the properties files and creates bindings for each and every one. As long as all of them are simple just like the examples you gave I think you should be