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 = PaymentInterpreter.class)
class BrazilianPayment implements Payment {

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


Otávio Gonçalves de Santana

55 (11) 98255-3513