se.jbee.inject.util
Interface Factory<T>
- Type Parameters:
T - The type of value produced
public interface Factory<T>
A slightly more high level abstraction than a Supplier purely for ease of implementation
of sources that behave like a classical factory (pattern).
- Author:
- Jan Bernitt (jan@jbee.se)
- See Also:
Supplier,
Provider
produce
<P> T produce(Instance<? super T> produced,
Instance<P> injected)
- Type Parameters:
P - The type of the receiving instance.- Parameters:
produced - Describes what should be produced.injected - Describes the instance that receives the produced instance.
- Returns:
- produced instance