Interface InjectorFactory

All Known Implementing Classes:
BindingsOverrideInjectorFactory, DefaultInjectorFactory
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface InjectorFactory
Creates guice injector instance. Custom implementation may be required for some guice extensions, like governator.
Since:
Dec 26, 2014
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.inject.Injector
    createInjector(com.google.inject.Stage stage, Iterable<? extends com.google.inject.Module> modules)
    Creates an injector instance.
  • Method Details

    • createInjector

      com.google.inject.Injector createInjector(com.google.inject.Stage stage, Iterable<? extends com.google.inject.Module> modules)
      Creates an injector instance.

      NOTE: if overriding modules were used (GuiceBundle.Builder.modulesOverride(Module...)) then modules list will contain only one overridden module. Modules.override(Module...) can be used on this module too, if required.

      Parameters:
      stage - target injector stage.
      modules - modules supplied to injector
      Returns:
      injector instance.