<div dir="ltr"><div style="font-size:12.8000001907349px">In CDI we have the Vetoed annotation[1] that vetoes the class, but we can&#39;t use expression to represent exclude this class.  This feature would useful to many things, for example, an internationalization of payment[2] or just have a class that should not run when is in production. In Delta Spike[3], already there are this improvement.<br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">[1]<a href="http://docs.jboss.org/cdi/api/1.2/javax/enterprise/inject/Vetoed.html" target="_blank">http://docs.jboss.org/cdi/api/1.2/javax/enterprise/inject/Vetoed.html</a></div><div style="font-size:12.8000001907349px">[2] </div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">public interface Payment {</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">        </span>void pay();</div><div style="font-size:12.8000001907349px">}</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">@Vetoed(onExpression = &quot;instance eq brazil&quot;, interpretedBy = PaymentInterpreter.class)</div><div style="font-size:12.8000001907349px">class BrazilianPayment implements Payment {</div><div style="font-size:12.8000001907349px">...</div><div style="font-size:12.8000001907349px">}</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">@Vetoed(onExpression = &quot;instance eq mexico&quot;, interpretedBy = PaymentInterpreter.class)</div><div style="font-size:12.8000001907349px">class MexicanPayment implements Payment {</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">        </span>...</div><div style="font-size:12.8000001907349px">}</div><div style="font-size:12.8000001907349px">[3]<a href="https://deltaspike.apache.org/documentation/core.html#__exclude" target="_blank">https://deltaspike.apache.org/documentation/core.html#__exclude</a></div><div><br></div>-- <div><br></div><div>Otávio Gonçalves de Santana<div class="gmail_signature"><div dir="ltr"><div style="text-align:center"><div style="text-align:start"><div style="text-align:center"><br><div style="text-align:left">twitter: <a href="http://twitter.com/otaviojava" target="_blank">http://twitter.com/otaviojava</a><br></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:left">55 (11) 98255-3513</div></div></div></div></div></div>
</div></div>