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 Type
    Method
    Description
    <T> T
    get(TypeLiteral<T> type, Annotation... qualifiers)
    Returns an injectable reference to a bean of given type with given qualifiers, assuming an injection point with the same type and qualifiers was registered on the SyntheticBeanBuilder.
    <T> T
    get(Class<T> type, Annotation... qualifiers)
    Returns an injectable reference to a bean of given type with given qualifiers, assuming an injection point with the same type and qualifiers was registered on the SyntheticBeanBuilder.
  • Method Details

    • get

      <T> T get(Class<T> type, Annotation... qualifiers)
      Returns an injectable reference to a bean of given type with given qualifiers, assuming an injection point with the same type and qualifiers was registered on the SyntheticBeanBuilder. Throws IllegalArgumentException if no such injection point was registered.

      If no qualifier is passed, @Default is assumed.

      Type Parameters:
      T - the type of the bean to lookup
      Parameters:
      type - the type of the bean to lookup, must not be null
      qualifiers - the qualifiers of the bean to lookup, may be null or empty
      Returns:
      injectable reference to the bean; may only be null if the bean is @Dependent
      Throws:
      IllegalArgumentException - if the type/qualifiers combination was not registered
    • get

      <T> T get(TypeLiteral<T> type, Annotation... qualifiers)
      Returns an injectable reference to a bean of given type with given qualifiers, assuming an injection point with the same type and qualifiers was registered on the SyntheticBeanBuilder. Throws IllegalArgumentException if no such injection point was registered.

      If no qualifier is passed, @Default is assumed.

      Type Parameters:
      T - the type of the bean to lookup
      Parameters:
      type - the type of the bean to lookup, must not be null
      qualifiers - the qualifiers of the bean to lookup, may be null or empty
      Returns:
      injectable reference to the bean; may only be null if the bean is @Dependent
      Throws:
      IllegalArgumentException - if the type/qualifiers combination was not registered