Class JerseyInjectionTarget<T>
java.lang.Object
org.jboss.weld.injection.producer.AbstractProducer<T>
org.jboss.weld.injection.producer.BasicInjectionTarget<T>
org.glassfish.jersey.inject.cdi.se.injector.JerseyInjectionTarget<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 JerseyInjectionTarget<T>
extends org.jboss.weld.injection.producer.BasicInjectionTarget<T>
Wrapper for 
InjectionTarget that implements the functionality of injecting using JAX-RS annotations into provided
 instances. Delegate is a original InjectionTarget which is able to inject other fields/parameters which
 are managed by CDI.
 
 Implementation is also able create with custom jerseyConstructor if it is provided. This functionality allows override
 default instantiator and use the Jersey-specific one.
- Author:
- Petr Bouda
- 
Field SummaryFields inherited from class org.jboss.weld.injection.producer.BasicInjectionTargetbeanManager
- 
Constructor SummaryConstructorsConstructorDescriptionJerseyInjectionTarget(org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> annotatedType, org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate, jakarta.enterprise.inject.spi.Bean<T> bean, Class<T> clazz, Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers, org.jboss.weld.injection.producer.Instantiator<T> instantiator) Creates a new injection target which is able to delegate an injection todelegate injection targetand inject the fields that are Jersey-specific.JerseyInjectionTarget(org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate, jakarta.enterprise.inject.spi.Bean<T> bean, Class<T> clazz, Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers) Creates a new injection target which is able to delegate an injection todelegate injection targetand inject the fields that are Jersey-specific.JerseyInjectionTarget(org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate, Class<T> clazz) Creates a new injection target which is able to delegate an injection todelegate injection targetand inject the fields that are Jersey-specific.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidjakarta.enterprise.inject.spi.Bean<T>getBean()org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T>voidinitializeAfterBeanDiscovery(org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> annotatedType) Copied method from the parent class because of a custom type ofInstantiatoris used in this implementation.voidvoidsetInjectionResolvers(Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers) In some cases Injection Resolvers cannot be provided during th creation of the object therefore must be set later on.Methods inherited from class org.jboss.weld.injection.producer.BasicInjectionTargetcheckType, create, createDefault, createNonCdiInterceptor, dispose, getAnnotated, getAnnotatedType, getBeanManager, getInjectionPoints, getInjector, getInstantiator, getLifecycleCallbackInvoker, getType, hasDecorators, hasInterceptors, initInstantiator, postConstruct, preDestroy, produce, setInstantiator, toStringMethods inherited from class org.jboss.weld.injection.producer.AbstractProducerequals, hashCode
- 
Constructor Details- 
JerseyInjectionTargetpublic JerseyInjectionTarget(org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate, Class<T> clazz) Creates a new injection target which is able to delegate an injection todelegate injection targetand inject the fields that are Jersey-specific. The resolvers must be set later on. CDI will select its own constructor.- Parameters:
- delegate- CDI specific injection target.
- clazz- class that will be scanned and injected.
 
- 
JerseyInjectionTargetpublic JerseyInjectionTarget(org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate, jakarta.enterprise.inject.spi.Bean<T> bean, Class<T> clazz, Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers) Creates a new injection target which is able to delegate an injection todelegate injection targetand inject the fields that are Jersey-specific. CDI will select its own constructor.- Parameters:
- delegate- CDI specific injection target.
- bean- bean which this injection target belongs to.
- clazz- class that will be scanned and injected.
- resolvers- all resolvers that can provide a valued for Jersey-specific injection.
 
- 
JerseyInjectionTargetpublic JerseyInjectionTarget(org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> annotatedType, org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate, jakarta.enterprise.inject.spi.Bean<T> bean, Class<T> clazz, Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers, org.jboss.weld.injection.producer.Instantiator<T> instantiator) Creates a new injection target which is able to delegate an injection todelegate injection targetand inject the fields that are Jersey-specific. This method accepts custom instantiator, if the instantiator isnulldefault one is created.- Parameters:
- annotatedType- resolved type of the registered bean.
- delegate- CDI specific injection target.
- bean- bean which this injection target belongs to.
- clazz- class that will be scanned and injected.
- resolvers- all resolvers that can provide a valued for Jersey-specific injection.
- instantiator- default instantiator.
 
 
- 
- 
Method Details- 
checkDelegateInjectionPointsprotected void checkDelegateInjectionPoints()- Overrides:
- checkDelegateInjectionPointsin class- org.jboss.weld.injection.producer.AbstractProducer<T>
 
- 
inject
- 
initializeAfterBeanDiscoverypublic void initializeAfterBeanDiscovery(org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> annotatedType) Copied method from the parent class because of a custom type ofInstantiatoris used in this implementation.- Overrides:
- initializeAfterBeanDiscoveryin class- org.jboss.weld.injection.producer.BasicInjectionTarget<T>
- Parameters:
- annotatedType- processed class.
 
- 
getBean- Overrides:
- getBeanin class- org.jboss.weld.injection.producer.BasicInjectionTarget<T>
 
- 
setInjectionResolverspublic void setInjectionResolvers(Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers) In some cases Injection Resolvers cannot be provided during th creation of the object therefore must be set later on.- Parameters:
- resolvers- all registered injection resolvers.
 
- 
getEnhancedAnnotatedType
 
-