Class JaxrsInjectionTarget<T>

java.lang.Object
org.jboss.resteasy.cdi.JaxrsInjectionTarget<T>
All Implemented Interfaces:
jakarta.enterprise.inject.spi.InjectionTarget<T>, jakarta.enterprise.inject.spi.Producer<T>

@Deprecated(forRemoval=true, since="7.0.3") public class JaxrsInjectionTarget<T> extends Object implements jakarta.enterprise.inject.spi.InjectionTarget<T>
Deprecated, for removal: This API element is subject to removal in a future version.
this should not be used outside of this module and may be removed in a future release
An InjectionTarget wrapper for Jakarta REST components that performs property injection and validation after CDI injection.

Property injection via PropertyInjectorImpl is used to populate @Context and @*Param-annotated fields and setters which CDI does not inject. Members CDI injects, those annotated with @Inject on the bean's annotated type, including the members the RESTEasy CDI extensions add @Inject to, are skipped.

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

    Constructors
    Modifier
    Constructor
    Description
     
    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
    protected
    JaxrsInjectionTarget(jakarta.enterprise.inject.spi.InjectionTarget<T> delegate, Class<T> clazz, Predicate<Member> propertyInjectionFilter)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new wrapped InjectionTarget for custom RESTEasy bean validation and property injection.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    dispose(T instance)
    Deprecated, 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.
     
    void
    inject(T instance, jakarta.enterprise.context.spi.CreationalContext<T> ctx)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    postConstruct(T instance)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    preDestroy(T instance)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    produce(jakarta.enterprise.context.spi.CreationalContext<T> ctx)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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, Predicate<Member> propertyInjectionFilter)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new wrapped InjectionTarget for custom RESTEasy bean validation and property injection.

      A PropertyInjector is used to inject the @Context and @*Param injection points CDI does not inject. The propertyInjectionFilter returns true for members the property injector should skip because CDI injects them.

      Parameters:
      delegate - the delegate injection target
      clazz - the type of the bean
      propertyInjectionFilter - the filter for members RESTEasy property injection should skip
  • Method Details

    • inject

      public void inject(T instance, jakarta.enterprise.context.spi.CreationalContext<T> ctx)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      inject in interface jakarta.enterprise.inject.spi.InjectionTarget<T>
    • postConstruct

      public void postConstruct(T instance)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      postConstruct in interface jakarta.enterprise.inject.spi.InjectionTarget<T>
    • preDestroy

      public void preDestroy(T instance)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      preDestroy in interface jakarta.enterprise.inject.spi.InjectionTarget<T>
    • dispose

      public void dispose(T instance)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      dispose in interface jakarta.enterprise.inject.spi.Producer<T>
    • getInjectionPoints

      public Set<jakarta.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getInjectionPoints in interface jakarta.enterprise.inject.spi.Producer<T>
    • produce

      public T produce(jakarta.enterprise.context.spi.CreationalContext<T> ctx)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      produce in interface jakarta.enterprise.inject.spi.Producer<T>