Package jakarta.enterprise.inject.spi
Interface InjectionTarget<T>
- Type Parameters:
T- The class of the instance
- All Superinterfaces:
Producer<T>
Provides operations for performing dependency injection and lifecycle callbacks on an instance of a type.
CDI Lite implementations are not required to provide support for InjectionTarget.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidinject(T instance, CreationalContext<T> ctx) Performs dependency injection upon the given object.voidpostConstruct(T instance) Calls thecallback, if it exists, according to the semantics required by the Java EE platform specification.invalid reference
jakarta.annotation.PostConstructvoidpreDestroy(T instance) Calls thecallback, if it exists, according to the semantics required by the Java EE platform specification.invalid reference
jakarta.annotation.PreDestroyMethods inherited from interface jakarta.enterprise.inject.spi.Producer
dispose, getInjectionPoints, produce
-
Method Details
-
inject
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 injectionctx- TheCreationalContextto use for creating new instances
-
postConstruct
Calls the
callback, if it exists, according to the semantics required by the Java EE platform specification.invalid reference
jakarta.annotation.PostConstruct- Parameters:
instance- The instance on which to invoke themethodinvalid reference
jakarta.annotation.PostConstruct
-
preDestroy
Calls the
callback, if it exists, according to the semantics required by the Java EE platform specification.invalid reference
jakarta.annotation.PreDestroy- Parameters:
instance- The instance on which to invoke themethodinvalid reference
jakarta.annotation.PreDestroy
-