We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Singleton public class CombinedMapSomei { private final Map<String, Somei> somes; /** * Inject map of beans keyed by qualifier name. */ @Inject public CombinedMapSomei(Map<String, Somei> somes) { this.somes = somes; }
SomeStore greenStore = beanScope.get(SomeStore.class, "green"); SomeStore blueStore = beanScope.get(SomeStore.class, "blue"); // get dependencies as a map keyed by qualifier name Map<String, SomeStore> stores = beanScope.map(SomeStore.class); SomeStore green = stores.get("green"); assertThat(green).isSameAs(greenStore); SomeStore blue = stores.get("blue"); assertThat(blue).isSameAs(blueStore);
The text was updated successfully, but these errors were encountered:
#230 - ENH: Add support for injecting into Map<String,T> (by qualifier)
824efcb
rbygrave
Successfully merging a pull request may close this issue.
Inject map of beans keyed by qualifier name.
Get dependencies as a map keyed by qualifier name
The text was updated successfully, but these errors were encountered: