Class DelegatingInjectionTarget<T>

  • Type Parameters:
    T - the type of produced object
    All Implemented Interfaces:
    javax.enterprise.inject.spi.InjectionTarget<T>, javax.enterprise.inject.spi.Producer<T>

    public class DelegatingInjectionTarget<T>
    extends DelegatingProducer<T>
    implements javax.enterprise.inject.spi.InjectionTarget<T>
    A DelegatingProducer and an InjectionTarget that forwards all method calls to underlying InjectionTarget and Producer implementations.
    See Also:
    InjectionTarget, Producer
    • Constructor Detail

      • DelegatingInjectionTarget

        public DelegatingInjectionTarget​(javax.enterprise.inject.spi.InjectionTarget<T> injectionTargetDelegate,
                                         javax.enterprise.inject.spi.Producer<T> producerDelegate)
        Parameters:
        injectionTargetDelegate - the InjectionTarget to which InjectionTarget-specific operations will be forwarded; must not be null
        producerDelegate - the Producer to which Producer-specific operations will be forwarded; must not be null
        Throws:
        NullPointerException - if either parameter is null
    • Method Detail

      • inject

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

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

        public void preDestroy​(T instance)
        Specified by:
        preDestroy in interface javax.enterprise.inject.spi.InjectionTarget<T>