T - public class NonProducibleInjectionTarget<T> extends BasicInjectionTarget<T>
InjectionTarget for classes that do not fulfill bean class requirements (e.g. are abstract or non-static inner classes).
Instances of these class can be injected using this implementation. If the application attempts to produce(CreationalContext) a new instance of the
class, CreationException is thrown.WELD-1441beanManager| Modifier and Type | Method and Description |
|---|---|
static <T> NonProducibleInjectionTarget<T> |
create(EnhancedAnnotatedType<T> type,
Bean<T> bean,
BeanManagerImpl beanManager) |
static <T> NonProducibleInjectionTarget<T> |
create(EnhancedAnnotatedType<T> type,
Bean<T> bean,
Injector<T> injector,
LifecycleCallbackInvoker<T> invoker,
BeanManagerImpl beanManager) |
boolean |
hasDecorators() |
boolean |
hasInterceptors() |
protected void |
checkType(EnhancedAnnotatedType<T> type) |
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.
|
T |
produce(CreationalContext<T> ctx)
Causes an instance to be produced via the
Producer. |
create, createDefault, createDefault, createNonCdiInterceptor, dispose, getAnnotated, getAnnotatedType, getBean, getBeanManager, getInjectionPoints, getInjector, getInstantiator, getLifecycleCallbackInvoker, getType, initializeAfterBeanDiscovery, inject, postConstruct, preDestroy, setInstantiator, toStringequals, hashCode, checkDelegateInjectionPointspublic static <T> NonProducibleInjectionTarget<T> create(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager)
public static <T> NonProducibleInjectionTarget<T> create(EnhancedAnnotatedType<T> type, Bean<T> bean, Injector<T> injector, LifecycleCallbackInvoker<T> invoker, BeanManagerImpl beanManager)
protected Instantiator<T> initInstantiator(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager, Set<InjectionPoint> injectionPoints)
BasicInjectionTargetBasicInjectionTarget.initInstantiator(EnhancedAnnotatedType, Bean, BeanManagerImpl, Set) method is supposed to register all these
injection points within the injectionPoints set passed in as a parameter.initInstantiator in class BasicInjectionTarget<T>public T produce(CreationalContext<T> ctx)
Producer
Causes an instance to be produced via the Producer.
If the Producer represents a class, this will invoke the constructor annotated Inject if it
exists, or the constructor with no parameters otherwise. If the class has interceptors, produce() is responsible
for building the interceptors and decorators of the instance.
If the Producer represents a producer field or method, this will invoke the producer method on, or access the
producer field of, a contextual instance of the bean that declares the producer.
produce in interface Producer<T>produce in class BasicInjectionTarget<T>ctx - The CreationalContext to use for the produced objectprotected void checkType(EnhancedAnnotatedType<T> type)
checkType in class BasicInjectionTarget<T>public boolean hasInterceptors()
hasInterceptors in class BasicInjectionTarget<T>public boolean hasDecorators()
hasDecorators in class BasicInjectionTarget<T>Copyright © 2016. All Rights Reserved.