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-1441
beanManager
Constructor and Description |
---|
NonProducibleInjectionTarget(EnhancedAnnotatedType<T> type,
Bean<T> bean,
BeanManagerImpl beanManager) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkType(EnhancedAnnotatedType<T> type) |
boolean |
hasDecorators() |
boolean |
hasInterceptors() |
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 . |
dispose, getAnnotated, getBean, getBeanManager, getInjectionPoints, getInjector, getInstantiator, getLifecycleCallbackInvoker, getType, initializeAfterBeanDiscovery, initInjector, initInvoker, inject, postConstruct, preDestroy, setInstantiator, toString
checkDelegateInjectionPoints, equals, hashCode
public NonProducibleInjectionTarget(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager)
protected Instantiator<T> initInstantiator(EnhancedAnnotatedType<T> type, Bean<T> bean, BeanManagerImpl beanManager, Set<InjectionPoint> injectionPoints)
BasicInjectionTarget
BasicInjectionTarget.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 © 2013 Seam Framework. All Rights Reserved.