Package jakarta.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. CDI Lite implementations are not required to provide support for InjectionTarget.- Author:
- Pete Muir, David Allen
- See Also:
- PostConstruct,- PreDestroy
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinject(T instance, CreationalContext<T> ctx)Performs dependency injection upon the given object.voidpostConstruct(T instance)Calls thePostConstructcallback, if it exists, according to the semantics required by the Java EE platform specification.voidpreDestroy(T instance)Calls thePreDestroycallback, if it exists, according to the semantics required by the Java EE platform specification.- 
Methods inherited from interface jakarta.enterprise.inject.spi.Producerdispose, getInjectionPoints, produce
 
- 
 
- 
- 
- 
Method Detail- 
injectvoid 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- CreationalContextto use for creating new instances
 
 - 
postConstructvoid postConstruct(T instance) Calls the PostConstructcallback, if it exists, according to the semantics required by the Java EE platform specification.- Parameters:
- instance- The instance on which to invoke the- PostConstructmethod
 
 - 
preDestroyvoid preDestroy(T instance) Calls the PreDestroycallback, if it exists, according to the semantics required by the Java EE platform specification.- Parameters:
- instance- The instance on which to invoke the- PreDestroymethod
 
 
- 
 
-