Top Description Methods
org.testng

public Interface IInjectorFactory

Known Direct Implementers
org.testng.internal.objects.GuiceBackedInjectorFactory
Imports
com.google.inject.Injector, .Module, .Stage, javax.annotation.Nullable

Allows customization of the Injector creation when working with dependency injection.

Method Summary

Modifier and TypeMethod and Description
public default Injector

Returns:

- An com.google.inject.Injector instance that can be used to perform dependency injection.
getInjector
(Injector
- Parent com.google.inject.Injector instance that was built with parent injector
parent
,
Stage
- A Stage object that defines the appropriate stage
stage
,
Module...
- An array of Module
modules
)

Method Detail

getInjectorback to summary
public default Injector getInjector(Injector parent, Stage stage, Module... modules)
Parameters
parent:Injector

- Parent com.google.inject.Injector instance that was built with parent injector

stage:Stage

- A Stage object that defines the appropriate stage

modules:Module[]

- An array of Module

Returns:Injector

- An com.google.inject.Injector instance that can be used to perform dependency injection.