Java inject implementation using TypeLiteral
问题 I have a project that provides an interface, let's call it IImplementMe, which i want to inject into my project. This interface will be implemented by various producers, so I need to inject all implementations. I am trying to use TypeLiteral for this. Here is the code of the producer : @Singleton public class SomeImplementation implements IImplementMe { private final String value; @Inject public SomeImplementation(final SomeOtherConfig configuration) { this.value= configuration.getValue(); }