javax.enterprise.inject.spi

Interface InjectionTargetFactory<T>

  • All Known Subinterfaces:
    WeldInjectionTargetFactory<T>
    All Known Implementing Classes:
    InjectionTargetFactoryImpl


    public interface InjectionTargetFactory<T>

    An InjectionTargetFactory can create an InjectionTarget for a given bean.

    The InjectionTargetFactory obtained from BeanManager.getInjectionTargetFactory(AnnotatedType) is capable of providing container created injection targets. This factory can be wrapped to add behavior to container created injection targets.

    For example:

     BeanAttributes<MyBean> myBeanAttributes = beanManager.createBeanAttributes(myBeanAnnotatedType); beanManager.createBean(myBeanAttributes, MyBean.class, new InjectionTargetFactory() {      public <T> InjectionTarget<T> createInjectionTarget(Bean<T> bean) {         return new WrappingInjectionTarget<T>(beanManager.getInjectionTargetFactory(myBeanAnnotatedType).createInjectionTarget(                 bean));     } }); 
    Since:
    1.1
    Author:
    Pete Muir
    • Method Detail

      • createInjectionTarget

        InjectionTarget<T> createInjectionTarget(Bean<T> bean)
        Create a new injection target for a bean.
        Parameters:
        bean - the bean to create the injection target for, or null if creating a non-contextual object
        Returns:
        the injection target

Copyright © 2015. All Rights Reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14