Uses of Interface
io.avaje.inject.BeanScopeBuilder
| Package | Description |
|---|---|
| io.avaje.inject |
Avaje Inject API - see
ApplicationScope and BeanScope. |
-
Uses of BeanScopeBuilder in io.avaje.inject
Methods in io.avaje.inject that return BeanScopeBuilder Modifier and Type Method Description static BeanScopeBuilderBeanScope. newBuilder()Build a bean scope with options for shutdown hook and supplying test doubles.<D> BeanScopeBuilderBeanScopeBuilder. withBean(Class<D> type, D bean)Add a supplied bean instance with the given injection type.<D> BeanScopeBuilderBeanScopeBuilder. withBean(String name, Class<D> type, D bean)Add a supplied bean instance with the given name and injection type.BeanScopeBuilderBeanScopeBuilder. withBeans(Object... beans)Supply a bean to the scope that will be used instead of any similar bean in the scope.BeanScopeBuilderBeanScopeBuilder. withIgnoreMissingModuleDependencies()Set this when building a BeanScope (typically for testing) and supplied beans replace module dependencies.BeanScopeBuilderBeanScopeBuilder. withMock(Class<?> type)Use a mockito mock when injecting this bean type.BeanScopeBuilderBeanScopeBuilder. withMock(Class<?> type, String name)Register as a Mockito mock with a qualifier name.<D> BeanScopeBuilderBeanScopeBuilder. withMock(Class<D> type, Consumer<D> consumer)Use a mockito mock when injecting this bean type additionally running setup on the mock instance.BeanScopeBuilderBeanScopeBuilder. withModules(String... modules)Specify the modules to include in dependency injection.BeanScopeBuilderBeanScopeBuilder. withNoShutdownHook()Deprecated.BeanScopeBuilderBeanScopeBuilder. withShutdownHook(boolean shutdownHook)Create the bean scope registering a shutdown hook (defaults to false, no shutdown hook).BeanScopeBuilderBeanScopeBuilder. withSpy(Class<?> type)Use a mockito spy when injecting this bean type.BeanScopeBuilderBeanScopeBuilder. withSpy(Class<?> type, String name)Register a Mockito spy with a qualifier name.<D> BeanScopeBuilderBeanScopeBuilder. withSpy(Class<D> type, Consumer<D> consumer)Use a mockito spy when injecting this bean type additionally running setup on the spy instance.