Class DecoratorInjectionTarget<T>
- java.lang.Object
-
- org.jboss.weld.injection.producer.AbstractProducer<T>
-
- org.jboss.weld.injection.producer.BasicInjectionTarget<T>
-
- org.jboss.weld.injection.producer.BeanInjectionTarget<T>
-
- org.jboss.weld.injection.producer.DecoratorInjectionTarget<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
InjectionTarget<T>,Producer<T>,org.jboss.weld.manager.api.WeldInjectionTarget<T>
public class DecoratorInjectionTarget<T> extends BeanInjectionTarget<T>
InjectionTargetimplementation used for decorators.- Author:
- Jozef Hartinger
-
-
Field Summary
-
Fields inherited from class org.jboss.weld.injection.producer.BasicInjectionTarget
beanManager
-
-
Constructor Summary
Constructors Constructor Description DecoratorInjectionTarget(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckDelegateInjectionPoints()voidinitializeAfterBeanDiscovery(EnhancedAnnotatedType<T> annotatedType)protected Instantiator<T>initInstantiator(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager, Set<InjectionPoint> injectionPoints)Returns an instantiator that will be used to create a new instance of a given component.voidinject(T instance, CreationalContext<T> ctx)Performs dependency injection upon the given object.-
Methods inherited from class org.jboss.weld.injection.producer.BeanInjectionTarget
buildInterceptionModel, checkDecoratedMethods, checkNoArgsConstructor, createDefault, dispose, forCdiInterceptor, getBean, initializeInterceptionModel, isDecorator, isInterceptionCandidate, isInterceptor, produce, setupConstructorInterceptionInstantiator
-
Methods inherited from class org.jboss.weld.injection.producer.BasicInjectionTarget
checkType, create, createDefault, createNonCdiInterceptor, getAnnotated, getAnnotatedType, getBeanManager, getInjectionPoints, getInjector, getInstantiator, getLifecycleCallbackInvoker, getType, hasDecorators, hasInterceptors, postConstruct, preDestroy, setInstantiator, toString
-
Methods inherited from class org.jboss.weld.injection.producer.AbstractProducer
equals, hashCode
-
-
-
-
Constructor Detail
-
DecoratorInjectionTarget
public DecoratorInjectionTarget(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager)
-
-
Method Detail
-
initInstantiator
protected Instantiator<T> initInstantiator(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager, Set<InjectionPoint> injectionPoints)
Description copied from class:BasicInjectionTargetReturns an instantiator that will be used to create a new instance of a given component. If the instantiator uses a constructor with injection points, the implementation of theBasicInjectionTarget.initInstantiator(EnhancedAnnotatedType, Bean, BeanManagerImpl, Set)method is supposed to register all these injection points within the injectionPoints set passed in as a parameter.- Overrides:
initInstantiatorin classBasicInjectionTarget<T>
-
checkDelegateInjectionPoints
protected void checkDelegateInjectionPoints()
- Overrides:
checkDelegateInjectionPointsin classAbstractProducer<T>
-
inject
public void inject(T instance, CreationalContext<T> ctx)
Description copied from interface:InjectionTargetPerforms dependency injection upon the given object. Performs Jakarta EE component environment injection, sets the value of all injected fields, and calls all initializer methods.
- Specified by:
injectin interfaceInjectionTarget<T>- Overrides:
injectin classBasicInjectionTarget<T>- Parameters:
instance- The instance upon which to perform injectionctx- TheCreationalContextto use for creating new instances
-
initializeAfterBeanDiscovery
public void initializeAfterBeanDiscovery(EnhancedAnnotatedType<T> annotatedType)
- Overrides:
initializeAfterBeanDiscoveryin classBeanInjectionTarget<T>
-
-