Package javax.enterprise.inject.spi
Interface Producer<T>
-
- All Known Subinterfaces:
InjectionTarget<T>
public interface Producer<T>
Provides a generic operation for producing an instance of a type.- Version:
- $Rev: 1427581 $ $Date: 2013-01-01 23:38:17 +0100 (Tue, 01 Jan 2013) $
bean type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dispose(T instance)
Its result depends on bean type.java.util.Set<InjectionPoint>
getInjectionPoints()
Its result depends on bean type.T
produce(CreationalContext<T> creationalContext)
Its result depends on bean type.
-
-
-
Method Detail
-
produce
T produce(CreationalContext<T> creationalContext)
Its result depends on bean type.- Bean Class : It calls the constructor annotated with
Initializer
if it exists, or the constructor with no parameters otherwise. - Producer Method or Field : Calls the producer method on, or accesses the producer field of, a contextual instance of the most specialized bean that specializes the bean that declares the producer method
- Parameters:
creationalContext
- creational context- Returns:
- an instance of bean
- Bean Class : It calls the constructor annotated with
-
dispose
void dispose(T instance)
Its result depends on bean type.- Bean Class : Does nothing.
- Producer Method : Calls disposer method or any other cleanup.
- Parameters:
instance
- dispose istance
-
getInjectionPoints
java.util.Set<InjectionPoint> getInjectionPoints()
Its result depends on bean type.- Bean Class : Returns the set of InjectionPoint objects representing all injected fields, bean constructor parameters and initializer method parameters.
- Producer Method : Returns the set of InjectionPoint objects representing all parameters of the producer method.
- Returns:
- set of injection points
-
-