Package io.avaje.inject.core
Class SuppliedBean<B>
- java.lang.Object
-
- io.avaje.inject.core.SuppliedBean<B>
-
public class SuppliedBean<B> extends Object
Holds beans supplied to the dependency injection.These are typically test doubles or mock instances that we supply in testing. When we supply bean instances they take precedence over other beans that would normally be injected.
-
-
Constructor Summary
Constructors Constructor Description SuppliedBean(Class<B> type, B bean)Create with a given target type and bean instance.SuppliedBean(Class<B> type, B bean, Consumer<B> consumer)Create with a consumer to setup the mock.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BgetBean()Return the bean instance to use (often a test double or mock).Class<B>getType()Return the dependency injection target type.
-
-
-
Constructor Detail
-
SuppliedBean
public SuppliedBean(Class<B> type, B bean)
Create with a given target type and bean instance.
-
-