<div dir="ltr">Hi guys,<div><br></div><div>could CDI 2 do step forward for generic producers?</div><div><br></div><div>The need is to produce any type (with a particular qualifier) without the need of an extension:</div><div><br></div><div>@Produces</div><div>@MyQualifier</div><div>Object create(InjectionPoint ip) { ... }</div><div><br></div><div>This is actually a common pattern (for configuration, or to integrate with 3rd party libs) and today the only hope to do so is to write an extension which is a bit technical and verbose for the result IMO.</div><div><br></div><div>I guess for compatibility reason we would need to do something like:</div><div><br></div><div><div>@Produces</div><div>@MyQualifier</div><div>@Generic</div><div>Object create(InjectionPoint ip) { ... }</div><div><br></div><div>and say that if there is a unique resolved bean thanks to qualifiers which is annotated @Generic then use this producer.</div><div><br></div><div>wdyt?</div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br><span style="font-size:small">Romain Manni-Bucau</span><br><a href="https://twitter.com/rmannibucau" target="_blank">@rmannibucau</a> |  <a href="http://rmannibucau.wordpress.com" target="_blank">Blog</a> | <a href="https://github.com/rmannibucau" target="_blank">Github</a> | <a href="https://www.linkedin.com/in/rmannibucau" target="_blank">LinkedIn</a> | <a href="http://www.tomitribe.com" target="_blank">Tomitriber</a></div></div></div></div></div></div></div></div></div></div>
</div></div>