Specifying a stereotype with a qualifier?
I can't understand why it seems illegal to include a qualifier when specifying a stereotype?
Trying to do so resulted in the following error message:
jboss.weld.exceptions.DefinitionException:
WELD-001103 Cannot declare qualifiers on stereotype interface
If this is by design I am curious to why or am I doing anything wrong? Tried to search this but could not find anything
cheers
From how I understand the specification, the main idea of a qualifier is to qualify a single bean type in case that there are ambiguous dependencies.
In contrast to that, the main idea of a stereotype is to bundle individual combinations of scope / named / interceptor / alternative annotatons to be re-used on multiple beans.
That kind of contradicts each other - so I'm not too surprised that this is forbidden by the container - event though it's only implicitly targeted by the spec (by not naming qualifiers as being allowed for stereotypes).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With