JavaScript is disabled on your browser.
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.enterprise.inject.spi

Interface InjectionTarget<T>

  • Type Parameters:
    T - The class of the instance
    All Superinterfaces:
    Producer<T>


    public interface InjectionTarget<T>
    extends Producer<T>

    Provides operations for performing dependency injection and lifecycle callbacks on an instance of a type.

    Author:
    Pete Muir, David Allen
    See Also:
    PostConstruct, PreDestroy
    • Method Summary

      All Methods
      Modifier and Type Method and Description
      void inject (T instance, CreationalContext<T> ctx)
      Performs dependency injection upon the given object.
      void postConstruct (T instance)
      Calls the PostConstruct callback, if it exists, according to the semantics required by the Java EE platform specification.
      void preDestroy (T instance)
      Calls the PreDestroy callback, if it exists, according to the semantics required by the Java EE platform specification.
    • Method Detail

      • inject

        void inject(T instance,
         CreationalContext<T> ctx)

        Performs dependency injection upon the given object. Performs Java EE component environment injection, sets the value of all injected fields, and calls all initializer methods.

        Parameters:
        instance - The instance upon which to perform injection
        ctx - The CreationalContext to use for creating new instances
      • postConstruct

        void postConstruct(T instance)

        Calls the PostConstruct callback, if it exists, according to the semantics required by the Java EE platform specification.

        Parameters:
        instance - The instance on which to invoke the PostConstruct method
      • preDestroy

        void preDestroy(T instance)

        Calls the PreDestroy callback, if it exists, according to the semantics required by the Java EE platform specification.

        Parameters:
        instance - The instance on which to invoke the PreDestroy method
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.

AltStyle によって変換されたページ (->オリジナル) /