Class WrappingJerseyInjectionTarget<T>

All Implemented Interfaces:
jakarta.enterprise.inject.spi.InjectionTarget<T>, jakarta.enterprise.inject.spi.Producer<T>

public class WrappingJerseyInjectionTarget<T> extends Object
An implementation of InjectionTarget that just wraps the provided InjectionTarget because of additional features in an injection phase.
Petr Bouda
  • Constructor Details

    • WrappingJerseyInjectionTarget

      public WrappingJerseyInjectionTarget(jakarta.enterprise.inject.spi.Bean<T> bean, Collection<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers)
      Creates a new jersey injection target with delegate as a WrappingJerseyInjectionTarget.NoOpInjectionTarget that creates no operation that means that only jersey injection is available as a additional feature.
      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<org.glassfish.jersey.internal.inject.InjectionResolver> resolvers)
      An implementation of InjectionTarget 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 to Producer.produce(CreationalContext) a new instance of the class, CreationException is thrown.
      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

      public void inject(T instance, jakarta.enterprise.context.spi.CreationalContext<T> ctx)
      Specified by:
      inject in interface jakarta.enterprise.inject.spi.InjectionTarget<T>
    • postConstruct

      public void postConstruct(T instance)
      Specified by:
      postConstruct in interface jakarta.enterprise.inject.spi.InjectionTarget<T>
    • preDestroy

      public void preDestroy(T instance)
      Specified by:
      preDestroy in interface jakarta.enterprise.inject.spi.InjectionTarget<T>
    • produce

      public T produce(jakarta.enterprise.context.spi.CreationalContext<T> ctx)
      Specified by:
      produce in interface jakarta.enterprise.inject.spi.Producer<T>
    • dispose

      public void dispose(T instance)
      Specified by:
      dispose in interface jakarta.enterprise.inject.spi.Producer<T>
    • getInjectionPoints

      public Set<jakarta.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
      Specified by:
      getInjectionPoints in interface jakarta.enterprise.inject.spi.Producer<T>