Interface SyntheticInjections
public interface SyntheticInjections
Provides injectable references for injection points registered for a synthetic bean.
A synthetic bean creation/destruction function can look up beans in this container
that were previously registered using
SyntheticBeanBuilder.withInjectionPoint().
The synthetic bean creation/destruction functions do not share the instance
of SyntheticInjections and do not share the injectable references
for registered injection points.
- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescription<T> Tget(TypeLiteral<T> type, Annotation... qualifiers) Returns an injectable reference to a bean of giventypewith givenqualifiers, assuming an injection point with the same type and qualifiers was registered on theSyntheticBeanBuilder.<T> Tget(Class<T> type, Annotation... qualifiers) Returns an injectable reference to a bean of giventypewith givenqualifiers, assuming an injection point with the same type and qualifiers was registered on theSyntheticBeanBuilder.
-
Method Details
-
get
Returns an injectable reference to a bean of giventypewith givenqualifiers, assuming an injection point with the same type and qualifiers was registered on theSyntheticBeanBuilder. ThrowsIllegalArgumentExceptionif no such injection point was registered.If no qualifier is passed,
@Defaultis assumed.- Type Parameters:
T- the type of the bean to lookup- Parameters:
type- the type of the bean to lookup, must not benullqualifiers- the qualifiers of the bean to lookup, may benullor empty- Returns:
- injectable reference to the bean; may only be
nullif the bean is@Dependent - Throws:
IllegalArgumentException- if the type/qualifiers combination was not registered
-
get
Returns an injectable reference to a bean of giventypewith givenqualifiers, assuming an injection point with the same type and qualifiers was registered on theSyntheticBeanBuilder. ThrowsIllegalArgumentExceptionif no such injection point was registered.If no qualifier is passed,
@Defaultis assumed.- Type Parameters:
T- the type of the bean to lookup- Parameters:
type- the type of the bean to lookup, must not benullqualifiers- the qualifiers of the bean to lookup, may benullor empty- Returns:
- injectable reference to the bean; may only be
nullif the bean is@Dependent - Throws:
IllegalArgumentException- if the type/qualifiers combination was not registered
-