Class DummyInjectionTarget<T>
- All Implemented Interfaces:
InjectionTarget<T>,Producer<T>
- Author:
- Stuart Douglas
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDestroys the instance.Returns the set of allInjectionPoints.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.produce(CreationalContext<T> ctx) Causes an instance to be produced via theProducer.
-
Constructor Details
-
DummyInjectionTarget
public DummyInjectionTarget()
-
-
Method Details
-
inject
Description copied from interface:InjectionTargetPerforms dependency injection upon the given object. Performs Java EE component environment injection, sets the value of all injected fields, and calls all initializer methods.
- Specified by:
injectin interfaceInjectionTarget<T>- Parameters:
instance- The instance upon which to perform injectionctx- TheCreationalContextto use for creating new instances
-
postConstruct
Description copied from interface:InjectionTargetCalls the
PostConstructcallback, if it exists, according to the semantics required by the Java EE platform specification.- Specified by:
postConstructin interfaceInjectionTarget<T>- Parameters:
instance- The instance on which to invoke thePostConstructmethod
-
preDestroy
Description copied from interface:InjectionTargetCalls the
PreDestroycallback, if it exists, according to the semantics required by the Java EE platform specification.- Specified by:
preDestroyin interfaceInjectionTarget<T>- Parameters:
instance- The instance on which to invoke thePreDestroymethod
-
dispose
Description copied from interface:ProducerDestroys the instance.
If the
Producerrepresents a class, then this operation does nothing.If the
Producerrepresents a producer field or method, this calls the disposer method, if any, on a contextual instance of the bean that declares the disposer method or performs any additional required cleanup, if any, to destroy state associated with a resource. -
getInjectionPoints
Description copied from interface:ProducerReturns the set of all
InjectionPoints. If theProducerrepresents a class, then this returns returns the set ofInjectionPointobjects representing all injected fields, bean constructor parameters and initializer method parameters. For a producer method, this returns the set ofInjectionPointobjects representing all parameters of the producer method.- Specified by:
getInjectionPointsin interfaceProducer<T>- Returns:
- the set of all injection points for the producer
-
produce
Description copied from interface:ProducerCauses an instance to be produced via the
Producer.If the
Producerrepresents a class, this will invoke the constructor annotatedInjectif it exists, or the constructor with no parameters otherwise. If the class has interceptors,produce()is responsible for building the interceptors and decorators of the instance.If the
Producerrepresents a producer field or method, this will invoke the producer method on, or access the producer field of, a contextual instance of the bean that declares the producer.- Specified by:
producein interfaceProducer<T>- Parameters:
ctx- TheCreationalContextto use for the produced object- Returns:
- the instance produced
-