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.
jakarta.annotation.PostConstruct , jakarta.annotation.PreDestroy
| Modifier and Type | Method and Description |
|---|---|
| public void | inject(T
The instance upon which to perform injection instance, CreationalContext<T> The ctx)CreationalContext to use for creating new instancesPerforms dependency injection upon the given object. |
| public void | postConstruct(T
The instance on which to invoke the instance)jakarta. method
Calls the |
| public void | preDestroy(T
The instance on which to invoke the instance)jakarta. method
Calls the |
| inject | back to summary |
|---|---|
| public 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.
| |
| postConstruct | back to summary |
|---|---|
| public void postConstruct(T instance)
Calls the
| |
| preDestroy | back to summary |
|---|---|
| public void preDestroy(T instance)
Calls the
| |