Package org.testng
Interface IInjectorFactory
-
public interface IInjectorFactory
Allows customization of theInjector
creation when working with dependency injection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 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.- As of TestNG7.5.0
-
-
-
Method Detail
-
getInjector
@Deprecated com.google.inject.Injector getInjector(com.google.inject.Stage stage, com.google.inject.Module... modules)
Deprecated.- As of TestNG7.5.0
Note thatgetInjector(Injector, Stage, Module...)
should be used instead.- Parameters:
stage
- - AStage
object that defines the appropriate stagemodules
- - An array ofModule
- 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
- - ParentInjector
instance that was built with parent injectorstage
- - AStage
object that defines the appropriate stagemodules
- - An array ofModule
- Returns:
- - An
Injector
instance that can be used to perform dependency injection.
-
-