Class WrappingJerseyInjectionTarget<T>
java.lang.Object
org.glassfish.jersey.inject.cdi.se.injector.WrappingJerseyInjectionTarget<T>
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.InjectionTarget<T>
,jakarta.enterprise.inject.spi.Producer<T>
An implementation of
InjectionTarget
that just wraps the provided InjectionTarget
because of additional
features in an injection phase.- Author:
- Petr Bouda
-
Constructor Summary
ConstructorDescriptionWrappingJerseyInjectionTarget
(jakarta.enterprise.inject.spi.Bean<T> bean, Collection<InjectionResolver> resolvers) Creates a new jersey injection target with delegate as aWrappingJerseyInjectionTarget.NoOpInjectionTarget
that creates no operation that means that only jersey injection is available as a additional feature.WrappingJerseyInjectionTarget
(jakarta.enterprise.inject.spi.InjectionTarget<T> delegate, jakarta.enterprise.inject.spi.Bean<T> bean, Collection<InjectionResolver> resolvers) An implementation ofInjectionTarget
for classes that do not fulfill bean class requirements (e.g. are abstract or non-static inner classes). -
Method Summary
Modifier and TypeMethodDescriptionvoid
Set<jakarta.enterprise.inject.spi.InjectionPoint>
void
void
postConstruct
(T instance) void
preDestroy
(T instance)
-
Constructor Details
-
WrappingJerseyInjectionTarget
public WrappingJerseyInjectionTarget(jakarta.enterprise.inject.spi.Bean<T> bean, Collection<InjectionResolver> resolvers) Creates a new jersey injection target with delegate as aWrappingJerseyInjectionTarget.NoOpInjectionTarget
that creates no operation that means that only jersey injection is available as a additional feature.- Parameters:
bean
- bean as descriptor of the class which will be injected.resolvers
- all resolvers that can provide a valued for Jersey-specific injection.
-
WrappingJerseyInjectionTarget
public WrappingJerseyInjectionTarget(jakarta.enterprise.inject.spi.InjectionTarget<T> delegate, jakarta.enterprise.inject.spi.Bean<T> bean, Collection<InjectionResolver> resolvers) 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 toProducer.produce(CreationalContext)
a new instance of the class,CreationException
is thrown.- Parameters:
delegate
- CDI specific injection target.bean
- bean as descriptor of the class which will be injected.resolvers
- all resolvers that can provide a valued for Jersey-specific injection.
-
-
Method Details
-
inject
- Specified by:
inject
in interfacejakarta.enterprise.inject.spi.InjectionTarget<T>
-
postConstruct
- Specified by:
postConstruct
in interfacejakarta.enterprise.inject.spi.InjectionTarget<T>
-
preDestroy
- Specified by:
preDestroy
in interfacejakarta.enterprise.inject.spi.InjectionTarget<T>
-
produce
- Specified by:
produce
in interfacejakarta.enterprise.inject.spi.Producer<T>
-
dispose
- Specified by:
dispose
in interfacejakarta.enterprise.inject.spi.Producer<T>
-
getInjectionPoints
- Specified by:
getInjectionPoints
in interfacejakarta.enterprise.inject.spi.Producer<T>
-