Class InjectionTargets


  • public class InjectionTargets
    extends Object
    Utility class for working with Jakarta Contexts and Dependency Injection InjectionTargets
    Author:
    Jozef Hartinger
    • Method Detail

      • createInjectionTarget

        public static <T> org.jboss.weld.manager.api.WeldInjectionTarget<T> createInjectionTarget​(Class<?> componentClass,
                                                                                                  jakarta.enterprise.inject.spi.Bean<T> bean,
                                                                                                  org.jboss.weld.manager.BeanManagerImpl beanManager,
                                                                                                  boolean interceptionSupport)
        Creates a new InjectionTarget for a given class. If the interceptionSupport flag is set to true the resulting instance will support interception (support provided by Weld). If an InjectionTarget is created for a component where interception support is implemented through component's view (Jakarta Enterprise Beans, managed beans) the flag must be set to false.
        Parameters:
        componentClass -
        bean -
        beanManager -
        interceptionSupport -
        Returns: