java.lang.Object
io.avaje.inject.spi.SuppliedBean
Holds beans supplied to the dependency injection.
These can be externally supplied dependencies or test doubles for testing purposes.
-
Method Summary
Modifier and TypeMethodDescriptionfinal Class<?>[]
Return the interfaces to additionally register along with the type.final String
name()
Return the qualifier name of the supplied bean.static SuppliedBean
Create with a class type and bean instance.static <B> SuppliedBean
Create for a class type with name.static <B> SuppliedBean
Create for a class type with a consumer that runs once when the bean is obtained.static SuppliedBean
Create a supplied bean for a generic type.final int
priority()
Return the associated priority.static SuppliedBean
Create a supplied bean with SECONDARY priority as a default fallback dependency that is only used when no other matching one is provided.source()
Return the bean instance or provider to use for injection.final Type
type()
Return the dependency injection target type.
-
Method Details
-
of
Create with a class type and bean instance. -
of
Create for a class type with a consumer that runs once when the bean is obtained. -
of
Create for a class type with name. -
ofType
Create a supplied bean for a generic type. -
secondary
Create a supplied bean with SECONDARY priority as a default fallback dependency that is only used when no other matching one is provided. -
source
Return the bean instance or provider to use for injection. -
priority
Return the associated priority. -
type
Return the dependency injection target type. -
name
Return the qualifier name of the supplied bean. -
interfaces
Return the interfaces to additionally register along with the type.
-