Interface BeanDecorator

  • All Known Implementing Classes:
    DefaultBeanDecorator

    public interface BeanDecorator
    Implementations of this interface should apply all CDI interceptors in the application to the given bean.

    This SPI is needed since CDI doesn't have a portable API to apply interceptors to a bean, and neither does it do this automatically.

    Author:
    Arjan Tijms
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> jakarta.enterprise.inject.spi.Bean<T> decorateBean​(jakarta.enterprise.inject.spi.Bean<T> decorableBean, Class<T> type, jakarta.enterprise.inject.spi.BeanManager beanManager)  
    • Method Detail

      • decorateBean

        <T> jakarta.enterprise.inject.spi.Bean<T> decorateBean​(jakarta.enterprise.inject.spi.Bean<T> decorableBean,
                                                               Class<T> type,
                                                               jakarta.enterprise.inject.spi.BeanManager beanManager)
        Parameters:
        decorableBean - Bean that should have CDI decorators applied
        type - main type of the bean
        beanManager - the current bean manager
        Returns:
        decorableBean with all CDI decorators for its type applied to it