Class JaxrsInjectionTarget<T>
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.InjectionTarget<T>, jakarta.enterprise.inject.spi.Producer<T>
InjectionTarget wrapper for Jakarta REST components that performs property injection and validation after
CDI injection.
For components not managed by CDI (e.g. EJB session beans), property injection via PropertyInjectorImpl is
used to populate @Context and @*Param-annotated fields. For CDI-managed components (those registered
in the ResteasyCdiExtension.beanContainer), property injection is skipped since CDI handles
field injection directly through producers.
Validation is performed for all root resource classes after injection, using a GeneralValidatorCDI resolved
from a ContextResolver. If the class has a @PostConstruct method, validation is deferred to the
postConstruct(Object) phase.
- Author:
- Jozef Hartinger, James R. Perkins
-
Constructor Summary
ConstructorsModifierConstructorDescriptionJaxrsInjectionTarget(jakarta.enterprise.inject.spi.InjectionTarget<T> delegate, Class<T> clazz) Deprecated, for removal: This API element is subject to removal in a future version.this should not be used outside of this moduleprotectedJaxrsInjectionTarget(jakarta.enterprise.inject.spi.InjectionTarget<T> delegate, Class<T> clazz, boolean usePropertyInjector) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new wrappedInjectionTargetfor custom RESTEasy bean validation and optional property inject. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.Set<jakarta.enterprise.inject.spi.InjectionPoint> Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidpostConstruct(T instance) Deprecated, for removal: This API element is subject to removal in a future version.voidpreDestroy(T instance) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
JaxrsInjectionTarget
@Deprecated(forRemoval=true, since="7.0.3") public JaxrsInjectionTarget(jakarta.enterprise.inject.spi.InjectionTarget<T> delegate, Class<T> clazz) Deprecated, for removal: This API element is subject to removal in a future version.this should not be used outside of this module -
JaxrsInjectionTarget
protected JaxrsInjectionTarget(jakarta.enterprise.inject.spi.InjectionTarget<T> delegate, Class<T> clazz, boolean usePropertyInjector) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new wrappedInjectionTargetfor custom RESTEasy bean validation and optional property inject.If the
usePropertyInjectoris set totrue, a newPropertyInjectoris used to inject Jakarta REST resources. These could be@Contextinjection points or the} injection points. For full CDI managed beans, this should typically beinvalid @link
{@link @*Paramfalse.- Parameters:
delegate- the delegate injection targetclazz- the type of the beanusePropertyInjector-trueif aPropertyInjectorshould be used and this is not a fully managed CDI bean, otherwise}invalid @link
{@link false
-
-
Method Details
-
inject
-
postConstruct
-
preDestroy
-
dispose
-
getInjectionPoints
-
produce
-