Package org.testng

Interface IInjectorFactory

All Known Implementing Classes:
GuiceBackedInjectorFactory

public interface IInjectorFactory
Allows customization of the Injector creation when working with dependency injection.
  • Method Summary

    Modifier and Type
    Method
    Description
    default com.google.inject.Injector
    getInjector(com.google.inject.Injector parent, com.google.inject.Stage stage, com.google.inject.Module... modules)
    Adding this method breaks existing implementations therefore for the time being (until deprecated method is removed) it calls the existing method.
    com.google.inject.Injector
    getInjector(com.google.inject.Stage stage, com.google.inject.Module... modules)
    Deprecated.
    Note that getInjector(Injector, Stage, Module...) should be used instead.
  • Method Details

    • getInjector

      @Deprecated com.google.inject.Injector getInjector(com.google.inject.Stage stage, com.google.inject.Module... modules)
      Deprecated.
      Note that getInjector(Injector, Stage, Module...) should be used instead.
      Parameters:
      stage - - A Stage object that defines the appropriate stage
      modules - - An array of Module
      Returns:
      - An Injector instance that can be used to perform dependency injection.
    • getInjector

      default com.google.inject.Injector getInjector(@Nullable com.google.inject.Injector parent, com.google.inject.Stage stage, com.google.inject.Module... modules)
      Adding this method breaks existing implementations therefore for the time being (until deprecated method is removed) it calls the existing method.
      Parameters:
      parent - - Parent Injector instance that was built with parent injector
      stage - - A Stage object that defines the appropriate stage
      modules - - An array of Module
      Returns:
      - An Injector instance that can be used to perform dependency injection.