Setting a stereotype with a qualifier won't work?

Setting a stereotype as a qualifier?

I can't figure out why it seems invalid to include a qualifier when specifying a stereotype?

Attempting to do this 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 why or am I doing something wrong? Tried looking for it but couldn't find anything

amuses

+3


source to share


1 answer


From the way I understand the spec, the main idea of ​​a qualifier is to qualify a single bean in case of ambiguous dependencies.

In contrast, the main idea behind the stereotype is to combine separate combinations of scope / named / interceptor / alternative annotates to be reused across multiple beans.



This contradicts each other, so I'm not too surprised that this is forbidden by the container-event, although it is implicitly targeting the spec (without specifying qualifiers as valid for stereotypes).

+3


source







All Articles