Package javax.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.
- Author:
- Pete Muir, David Allen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
inject
(T instance, CreationalContext<T> ctx) Performs dependency injection upon the given object.void
postConstruct
(T instance) Calls theinvalid reference
javax.annotation.PostConstruct
void
preDestroy
(T instance) Calls theinvalid reference
javax.annotation.PreDestroy
Methods inherited from interface javax.enterprise.inject.spi.Producer
dispose, getInjectionPoints, produce
-
Method Details
-
inject
Performs dependency injection upon the given object. Performs Jakarta 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
- TheCreationalContext
to use for creating new instances
-
postConstruct
Calls the
invalid reference
javax.annotation.PostConstruct
- Parameters:
instance
- The instance on which to invoke theinvalid reference
javax.annotation.PostConstruct
-
preDestroy
Calls the
invalid reference
javax.annotation.PreDestroy
- Parameters:
instance
- The instance on which to invoke theinvalid reference
javax.annotation.PreDestroy
-