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
Create a qualifier annotation. e.g.
@Qualifier @Retention(RUNTIME) public @interface Blue { }
Specify the qualifier annotation rather than @Named on beans and injection targets (constructor parameters, field injection).
@Named
@Blue @Singleton public class BlueStore implements SomeStore { ...
Constructor injection:
@Singleton public class StoreManagerWithQualifier { private final SomeStore store; public StoreManagerWithQualifier(@Blue SomeStore store) { this.store = store; }
Field injection:
@Singleton public class StoreManagerWithFieldQualifier { @Inject @Blue SomeStore store;
The text was updated successfully, but these errors were encountered:
#12 - Add support for @qualifier annotations (as alternative to @nAmed)
f97995a
rbygrave
No branches or pull requests
Create a qualifier annotation. e.g.
Specify the qualifier annotation rather than
@Named
on beans and injection targets (constructor parameters, field injection).Constructor injection:
Field injection:
The text was updated successfully, but these errors were encountered: