[cdi-dev] Vetoed with Expression

Otávio Gonçalves de Santana otaviojava at java.net
Fri Feb 20 16:23:07 EST 2015

In CDI we have the Vetoed annotation[1] that vetoes the class, but we can'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.


public interface Payment {
void pay();

@Vetoed(onExpression = "instance eq brazil", interpretedBy =
class BrazilianPayment implements Payment {

@Vetoed(onExpression = "instance eq mexico", interpretedBy =
class MexicanPayment implements Payment {


Otávio Gonçalves de Santana

twitter: http://twitter.com/otaviojava
site:     *http://about.me/otaviojava <http://about.me/otaviojava>*
55 (11) 98255-3513
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20150220/0b853211/attachment-0001.html 

More information about the cdi-dev mailing list