I think it could be a nice feature. Pls file a JIRA issue.
In order to get that bean, a bunch of quite verbose code is needed. I.e I came up with:
HttpAuthenticationMechanism mechanism =
createRef(
beanManager.resolve(
This wouldn't work because BeanManager.resolve() attempts to resolve the ambiguities thus eliminate all non-alternative beans.
This would not work - you would need to distinguish the original injection point.
return ...
}
}
Or reuse the @Delegate (perhaps with the @Alternative annotation)
-1 This might be confusing.