- 
- Type Parameters:
 T- type on which this InjectionTarget operates
public interface InjectionTargetFactory<T>An
InjectionTargetFactorycan create anInjectionTargetfor a given bean.The
InjectionTargetFactoryobtained fromBeanManager.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)); } });CDI Lite implementations are not required to provide support for
InjectionTargetFactory.- Since:
 - 1.1
 - Author:
 - Pete Muir, Antoine Sabot-Durand
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AnnotatedTypeConfigurator<T>configure()Returns anAnnotatedTypeConfiguratorto to configure theAnnotatedTypeused to create theInjectionTarget.InjectionTarget<T>createInjectionTarget(Bean<T> bean)Create a new injection target for a bean. 
 - 
 
- 
- 
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
 
 
- 
configure
default AnnotatedTypeConfigurator<T> configure()
Returns anAnnotatedTypeConfiguratorto to configure theAnnotatedTypeused to create theInjectionTarget. Each call returns the same AnnotatedTypeConfigurator.- Returns:
 - an 
AnnotatedTypeConfiguratorto configure injection points - Throws:
 java.lang.IllegalStateException- if used aftercreateInjectionTarget(Bean)invocation- Since:
 - 2.0
 
 
 - 
 
 -