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 TypeMethodDescriptiondefault com.google.inject.InjectorgetInjector(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.InjectorgetInjector(com.google.inject.Stage stage, com.google.inject.Module... modules) Deprecated.
-
Method Details
-
getInjector
@Deprecated com.google.inject.Injector getInjector(com.google.inject.Stage stage, com.google.inject.Module... modules) Deprecated.- As of TestNG7.5.0Note thatgetInjector(Injector, Stage, Module...)should be used instead.- Parameters:
stage- - AStageobject that defines the appropriate stagemodules- - An array ofModule- Returns:
- - An
Injectorinstance 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- - ParentInjectorinstance that was built with parent injectorstage- - AStageobject that defines the appropriate stagemodules- - An array ofModule- Returns:
- - An
Injectorinstance that can be used to perform dependency injection.
-
7.5.0