<div dir="ltr"><div class="gmail_extra">Hi Jozef,<br><br>thanks a lot for your response. So if I read this correctly, the qualifier doesn&#39;t need to be annotated with @Inherited for this behavior. Is that correct?<br><br>Christian</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-14 8:26 GMT+02:00 Jozef Hartinger <span dir="ltr">&lt;<a href="mailto:jharting@redhat.com" target="_blank">jharting@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hi Christian,<br>
    <br>
    yes, the specializing producer inherits all the qualifiers of the
    specialized producer. Furthermore, if the specialized producer had
    defined a name, this would have been inherited as well (even without
    explicit declaration on <font face="monospace, monospace">MyExtendedProducer.produce()</font>).
    See
    <a href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#direct_and_indirect_specialization" target="_blank">http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#direct_and_indirect_specialization</a>
    for details.<br>
    <br>
    Jozef<div><div class="h5"><br>
    <br>
    <div>On 04/14/2015 06:13 AM, Christian
      Kaltepoth wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hey all,
        <div><br>
        </div>
        <div>I&#39;ve a question regarding specializing qualified producer
          methods. It would be great to get your opinion on this.</div>
        <div><br>
        </div>
        <div>Imaging this producer method:</div>
        <div><br>
        </div>
        <div><font face="monospace, monospace">  public class MyProducer
            {</font></div>
        <div><font face="monospace, monospace">    @Produces</font></div>
        <div><font face="monospace, monospace">    @MyQualifier</font></div>
        <div><font face="monospace, monospace">    public Something
            produce() {</font></div>
        <div><font face="monospace, monospace">      // ...</font></div>
        <div><font face="monospace, monospace">    }</font></div>
        <div><font face="monospace, monospace">  }</font></div>
        <div><br>
        </div>
        <div>Now imagine the producer method is specialized like this:</div>
        <div><br>
        </div>
        <font face="monospace, monospace">  public class
          MyExtendedProducer extends MyProducer {<br>
              @Override<br>
        </font><span style="font-family:monospace,monospace">   
          @Produces</span><br style="font-family:monospace,monospace">
        <font face="monospace, monospace">    @Specializes<br>
              public Something produce() {<br>
                // ...<br>
              }<br>
            }</font>
        <div><br>
        </div>
        <div>Please not that I NOT added <font face="monospace,
            monospace">@MyQualifier</font> to the specializing producer
          method.</div>
        <div><br>
        </div>
        <div>Now for this injection point:</div>
        <div><br>
        </div>
        <div><font face="monospace, monospace">  @Inject</font></div>
        <div><font face="monospace, monospace">  @MyQualifier</font></div>
        <div><font face="monospace, monospace">  private Something
            something;</font></div>
        <div><br>
        </div>
        <div>What is expected to happen according to the spec? Will the
          specialized producer be used or not?</div>
        <div><br>
        </div>
        <div>Thanks</div>
        <div><br>
        </div>
        <div>Christian</div>
        <div><br>
        </div>
        <div>
          <div><br>
          </div>
          -- <br>
          <div>
            <div>Christian Kaltepoth</div>
            <div>Blog: <a href="http://blog.kaltepoth.de/" target="_blank">http://blog.kaltepoth.de/</a></div>
            <div>Twitter: <a href="http://twitter.com/chkal" target="_blank">http://twitter.com/chkal</a></div>
            <div>GitHub: <a href="https://github.com/chkal" target="_blank">https://github.com/chkal</a></div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
cdi-dev mailing list
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a>

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" target="_blank">http://www.apache.org/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.</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div>Christian Kaltepoth</div><div>Blog: <a href="http://blog.kaltepoth.de/" target="_blank">http://blog.kaltepoth.de/</a></div><div>Twitter: <a href="http://twitter.com/chkal" target="_blank">http://twitter.com/chkal</a></div><div>GitHub: <a href="https://github.com/chkal" target="_blank">https://github.com/chkal</a></div><div><br></div></div>
</div></div>