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>
An implementation of
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.- Author:
- Jozef Hartinger
-
Field Summary
Fields inherited from class org.jboss.weld.injection.producer.BasicInjectionTarget
beanManager -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckType(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) booleanbooleanprotected 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.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, toStringMethods inherited from class org.jboss.weld.injection.producer.AbstractProducer
checkDelegateInjectionPoints, equals, hashCode
-
Method Details
-
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: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>
-
produce
- Specified by:
producein interfacejakarta.enterprise.inject.spi.Producer<T>- Overrides:
producein classBasicInjectionTarget<T>
-
checkType
- Overrides:
checkTypein classBasicInjectionTarget<T>
-
hasInterceptors
public boolean hasInterceptors()- Overrides:
hasInterceptorsin classBasicInjectionTarget<T>
-
hasDecorators
public boolean hasDecorators()- Overrides:
hasDecoratorsin classBasicInjectionTarget<T>
-