public class JerseyInjectionTarget<T>
extends org.jboss.weld.injection.producer.BasicInjectionTarget<T>
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.
Constructor and Description |
---|
JerseyInjectionTarget(org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate,
javax.enterprise.inject.spi.Bean<T> bean,
Class<T> clazz,
Collection<InjectionResolver> resolvers)
Creates a new injection target which is able to delegate an injection to
delegate injection target and 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 to
delegate injection target and inject
the fields that are Jersey-specific. |
JerseyInjectionTarget(org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> annotatedType,
org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate,
javax.enterprise.inject.spi.Bean<T> bean,
Class<T> clazz,
Collection<InjectionResolver> resolvers,
org.jboss.weld.injection.producer.Instantiator<T> instantiator)
Creates a new injection target which is able to delegate an injection to
delegate injection target and inject
the fields that are Jersey-specific. |
Modifier and Type | Method and Description |
---|---|
protected void |
checkDelegateInjectionPoints() |
javax.enterprise.inject.spi.Bean<T> |
getBean() |
org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> |
getEnhancedAnnotatedType() |
void |
initializeAfterBeanDiscovery(org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> annotatedType)
Copied method from the parent class because of a custom type of
Instantiator is used in this implementation. |
void |
inject(T instance,
javax.enterprise.context.spi.CreationalContext<T> ctx) |
void |
setInjectionResolvers(Collection<InjectionResolver> resolvers)
In some cases Injection Resolvers cannot be provided during th creation of the object therefore must be set later on.
|
checkType, create, createDefault, createNonCdiInterceptor, dispose, getAnnotated, getAnnotatedType, getBeanManager, getInjectionPoints, getInjector, getInstantiator, getLifecycleCallbackInvoker, getType, hasDecorators, hasInterceptors, initInstantiator, postConstruct, preDestroy, produce, setInstantiator, toString
public JerseyInjectionTarget(org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate, Class<T> clazz)
delegate injection target
and inject
the fields that are Jersey-specific. The resolvers must be set later on. CDI will select its own constructor.delegate
- CDI specific injection target.clazz
- class that will be scanned and injected.public JerseyInjectionTarget(org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate, javax.enterprise.inject.spi.Bean<T> bean, Class<T> clazz, Collection<InjectionResolver> resolvers)
delegate injection target
and inject
the fields that are Jersey-specific. CDI will select its own constructor.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.public JerseyInjectionTarget(org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> annotatedType, org.jboss.weld.injection.producer.BasicInjectionTarget<T> delegate, javax.enterprise.inject.spi.Bean<T> bean, Class<T> clazz, Collection<InjectionResolver> resolvers, org.jboss.weld.injection.producer.Instantiator<T> instantiator)
delegate injection target
and inject
the fields that are Jersey-specific. This method accepts custom instantiator, if the instantiator is null
default one is created.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.protected void checkDelegateInjectionPoints()
checkDelegateInjectionPoints
in class org.jboss.weld.injection.producer.AbstractProducer<T>
public void initializeAfterBeanDiscovery(org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> annotatedType)
Instantiator
is used in this implementation.initializeAfterBeanDiscovery
in class org.jboss.weld.injection.producer.BasicInjectionTarget<T>
annotatedType
- processed class.public javax.enterprise.inject.spi.Bean<T> getBean()
getBean
in class org.jboss.weld.injection.producer.BasicInjectionTarget<T>
public void setInjectionResolvers(Collection<InjectionResolver> resolvers)
resolvers
- all registered injection resolvers.public org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> getEnhancedAnnotatedType()
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.