<div dir="auto">Hi Otavio<div dir="auto"><br></div><div dir="auto">Not sure it firts cdi-dev bit you can @Default @Ferrari @Typed(SportCar.class) the nice red car to exclude it from Car type and keep Car injection using DefaultCar and SportCar using the ferrari or implicit default qualifier.</div><div dir="auto"><br></div><div dir="auto">But the sample sounds like a misusage of qualifier so maybe check it is really what you and to do.</div><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">Le 8 juil. 2017 16:27, "Otávio Gonçalves de Santana" <<a href="mailto:otaviopolianasantana@gmail.com">otaviopolianasantana@gmail.com</a>> a écrit :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Hey, I have a question about heritage and CDI.</div><div>Given two interfaces: </div><div><ul><li>Car interface<br></li><li>SportCar that extends Car<br></li></ul></div><div><br></div><div><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span style="color:rgb(128,0,0);font-weight:bold">interface</span> Car<span style="color:rgb(128,0,128)">{</span>
<span style="color:rgb(128,0,128)">}</span>
<span style="color:rgb(128,0,0);font-weight:bold">interface</span> SportCar <span style="color:rgb(128,0,0);font-weight:bold">extends</span> Car<span style="color:rgb(128,0,128)">{</span>
<span style="color:rgb(128,0,128)">}</span>
<span style="color:rgb(128,0,0);font-weight:bold">class</span> DefaultCar <span style="color:rgb(128,0,0);font-weight:bold">implements</span> Car <span style="color:rgb(128,0,128)">{</span>
<span style="color:rgb(128,0,128)">}</span>
@FerrariQualifier
<span style="color:rgb(128,0,0);font-weight:bold">class</span> DefaultSportCar <span style="color:rgb(128,0,0);font-weight:bold">implements</span> SportCar <span style="color:rgb(128,0,128)">{</span>
<span style="color:rgb(128,0,128)">}</span>
What I would like to inject:
@Inject
<span style="color:rgb(128,0,0);font-weight:bold">private</span> Car car<span style="color:rgb(128,128,48)">;</span> <span style="color:rgb(105,105,105)">//inject DefaultCar</span>
@Inject
@FerrariQualifier
<span style="color:rgb(128,0,0);font-weight:bold">private</span> Car ferrari<span style="color:rgb(128,128,48)">;</span> <span style="color:rgb(105,105,105)">//inject DefaultSportCar</span>
@Inject
<span style="color:rgb(128,0,0);font-weight:bold">private</span> SportCar sportCar<span style="color:rgb(128,128,48)">;</span><span style="color:rgb(105,105,105)">//inject DefaultSportCar</span></pre></div><div><br></div><div><br></div><div>How can I do that?</div><font color="#888888"><div><br></div>-- <br><div class="m_-7699299757972604669gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Otávio Gonçalves de Santana<div><div style="text-align:center"><br><div style="text-align:left"><br></div><div style="text-align:left">twitter: <a href="http://twitter.com/otaviojava" target="_blank">http://twitter.com/<wbr>otaviojava</a></div><div style="text-align:left">site: <span style="text-align:center"><font color="#0000ee"><u><a href="http://about.me/otaviojava" target="_blank">http://about.me/otaviojava</a></u></font></span></div><div style="text-align:-webkit-auto"><br></div></div></div></div></div></div></div></div>
</font></div>
<br>______________________________<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 under the Apache License, Version 2 (<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 provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br></blockquote></div><br></div></div>