The goal was to propose a solution to apply Interceptors and Decorators on produced beans or custom beans. For producers we also have the problem of applying interceptor binding only on some method and not on the whole class. We looked for a solution that could be used in both case and that was more an "advanced users" approach than an out of box one.

The idea is to provide a class or a built-in bean to help produced bean instances using AnnotatedType to allow override of annotation on instance class. This suppose the addition of AnnotatedTypeBuilder to the SPI to ease the use of building a synthetic AnnotatedType . This would follow the same idea than the Unmanaged class which provide a way to inject bean in a non bean (non managed) class.

That would give something like:

public class MyAdvancedProducerBean { public BeanInstanceBuilder<MyClass> bib = new BeanInstanceBuilder<>(); @Produces @RequestScoped public MyClass produceTransactionalMyClass() { AnnotatedTypeBuilder<MyClass> atb = new AnnotatedTypeBuilder<>() .readFrom(MyClass.class) .addToMethod(MyClass.class.getMethod("performInTransaction") , new TransactionalLiteral()); return bib.readFromType(atb.build()) .build(); //instance of the bean with requested interceptors / decorators } public void disposeMyClass (@Disposes Myclass td) { bib.dispose(td); } }