Class NonProducibleInjectionTarget<T>
- java.lang.Object
-
- org.jboss.weld.injection.producer.AbstractProducer<T>
-
- org.jboss.weld.injection.producer.BasicInjectionTarget<T>
-
- org.jboss.weld.injection.producer.NonProducibleInjectionTarget<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.InjectionTarget<T>
,jakarta.enterprise.inject.spi.Producer<T>
,org.jboss.weld.manager.api.WeldInjectionTarget<T>
public class NonProducibleInjectionTarget<T> extends BasicInjectionTarget<T>
An implementation ofInjectionTarget
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 toproduce(CreationalContext)
a new instance of the class,CreationException
is thrown.- Author:
- Jozef Hartinger
-
-
Field Summary
-
Fields inherited from class org.jboss.weld.injection.producer.BasicInjectionTarget
beanManager
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkType(EnhancedAnnotatedType<T> type)
static <T> NonProducibleInjectionTarget<T>
create(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<T> bean, Injector<T> injector, LifecycleCallbackInvoker<T> invoker, BeanManagerImpl beanManager)
static <T> NonProducibleInjectionTarget<T>
create(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl beanManager)
boolean
hasDecorators()
boolean
hasInterceptors()
protected Instantiator<T>
initInstantiator(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl beanManager, Set<jakarta.enterprise.inject.spi.InjectionPoint> injectionPoints)
Returns an instantiator that will be used to create a new instance of a given component.T
produce(jakarta.enterprise.context.spi.CreationalContext<T> ctx)
-
Methods inherited from class org.jboss.weld.injection.producer.BasicInjectionTarget
create, createDefault, createNonCdiInterceptor, dispose, getAnnotated, getAnnotatedType, getBean, getBeanManager, getInjectionPoints, getInjector, getInstantiator, getLifecycleCallbackInvoker, getType, initializeAfterBeanDiscovery, inject, postConstruct, preDestroy, setInstantiator, toString
-
Methods inherited from class org.jboss.weld.injection.producer.AbstractProducer
checkDelegateInjectionPoints, equals, hashCode
-
-
-
-
Method Detail
-
create
public static <T> NonProducibleInjectionTarget<T> create(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl beanManager)
-
create
public static <T> NonProducibleInjectionTarget<T> create(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<T> bean, Injector<T> injector, LifecycleCallbackInvoker<T> invoker, BeanManagerImpl beanManager)
-
initInstantiator
protected Instantiator<T> initInstantiator(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl beanManager, Set<jakarta.enterprise.inject.spi.InjectionPoint> injectionPoints)
Description copied from class:BasicInjectionTarget
Returns 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:
initInstantiator
in classBasicInjectionTarget<T>
-
produce
public T produce(jakarta.enterprise.context.spi.CreationalContext<T> ctx)
- Specified by:
produce
in interfacejakarta.enterprise.inject.spi.Producer<T>
- Overrides:
produce
in classBasicInjectionTarget<T>
-
checkType
protected void checkType(EnhancedAnnotatedType<T> type)
- Overrides:
checkType
in classBasicInjectionTarget<T>
-
hasInterceptors
public boolean hasInterceptors()
- Overrides:
hasInterceptors
in classBasicInjectionTarget<T>
-
hasDecorators
public boolean hasDecorators()
- Overrides:
hasDecorators
in classBasicInjectionTarget<T>
-
-