<div dir="ltr">Thanks! Had it on my todo, but good that you created it ;)</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 27, 2018 at 2:23 PM, Matej Novotny <span dir="ltr"><<a href="mailto:manovotn@redhat.com" target="_blank">manovotn@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">FYI I have taken the liberty to create CDI issue so that this is not forgotten (for I believe that it could be valuable addition).<br>
Feel free to comment - <a href="https://issues.jboss.org/browse/CDI-723" rel="noreferrer" target="_blank">https://issues.jboss.org/<wbr>browse/CDI-723</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Matej<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
> From: "Martin Kouba" <<a href="mailto:mkouba@redhat.com">mkouba@redhat.com</a>><br>
> To: "arjan tijms" <<a href="mailto:arjan.tijms@gmail.com">arjan.tijms@gmail.com</a>><br>
> Cc: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
> Sent: Friday, February 16, 2018 11:28:10 AM<br>
> Subject: Re: [cdi-dev] Easy way to get 'original' type from alternative producers<br>
><br>
> Dne 15.2.2018 v 18:15 arjan tijms napsal(a):<br>
> > Hi,<br>
> ><br>
> > On Thu, Feb 15, 2018 at 10:57 AM, Martin Kouba <<a href="mailto:mkouba@redhat.com">mkouba@redhat.com</a><br>
> > <mailto:<a href="mailto:mkouba@redhat.com">mkouba@redhat.com</a>>> wrote:<br>
> ><br>
> ><br>
> > I think it could be a nice feature. Pls file a JIRA issue.<br>
> ><br>
> ><br>
> > Allright, I'll do that. Thx!<br>
> ><br>
> ><br>
> ><br>
> > In order to get that bean, a bunch of quite verbose code is<br>
> > needed. I.e I came up with:<br>
> ><br>
> > HttpAuthenticationMechanism mechanism =<br>
> > createRef(<br>
> > beanManager.resolve(<br>
> ><br>
> ><br>
> > This wouldn't work because BeanManager.resolve() attempts to resolve<br>
> > the ambiguities thus eliminate all non-alternative beans.<br>
> ><br>
> ><br>
> > It actually does seem to work, and I've been using it for a while now.<br>
><br>
> You're right - you're actually filtering the alternative bean<br>
> (ApplicationInit producer) and so there is only one bean left.<br>
><br>
> ><br>
> ><br>
> ><br>
> > This would not work - you would need to distinguish the original<br>
> > injection point.<br>
> ><br>
> > return ...<br>
> > }<br>
> > }<br>
> ><br>
> > Or reuse the @Delegate (perhaps with the @Alternative annotation)<br>
> ><br>
> ><br>
> > -1 This might be confusing.<br>
> ><br>
> ><br>
> > Agreed with both, it was just a bit of brain storming. Not sure what<br>
> > would be a better name though. @Original? @NonAlternative?<br>
> ><br>
> > Kind regards,<br>
> > Arjan Tijms<br>
> ><br>
> ><br>
><br>
> --<br>
> Martin Kouba<br>
> Senior Software Engineer<br>
> Red Hat, Czech Republic<br>
</div></div><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> cdi-dev mailing list<br>
> <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/cdi-dev</a><br>
><br>
> Note that for all code provided on this list, the provider licenses the code<br>
> under the Apache License, Version 2<br>
> (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/<wbr>licenses/LICENSE-2.0.html</a>). For all other ideas<br>
> provided on this list, the provider waives all patent and other intellectual<br>
> property rights inherent in such information.<br>
</div></div></blockquote></div><br></div>