java.lang.Object
io.github.pustike.inject.Injectors
public final class Injectors extends Object
This class provides factory methods to create
Injector
with bindings specified by modules
and using an InjectionPointLoader
.-
Method Summary
Modifier and Type Method Description static Injector
create(Module... modules)
Creates a newInjector
with bindings specified by given modules.static Injector
create(InjectionPointLoader injectionPointLoader, Iterable<Module> modules)
Creates a newInjector
with bindings specified by given modules and using aninjection point loader
.static Injector
create(Iterable<Module> modules)
Creates a newInjector
with bindings specified by given modules.static void
dispose(Injector injector)
Dispose or release all data held by the Default Injector.
-
Method Details
-
create
Creates a newInjector
with bindings specified by given modules.- Parameters:
modules
- an array of modules specifying type bindings- Returns:
- the newly created injector
- See Also:
create(Iterable)
-
create
Creates a newInjector
with bindings specified by given modules.- Parameters:
modules
- an iterable (list) of modules specifying type bindings- Returns:
- the newly created injector
- See Also:
create(InjectionPointLoader, Iterable)
-
create
Creates a newInjector
with bindings specified by given modules and using aninjection point loader
.- Parameters:
injectionPointLoader
- the injection point loader,modules
- an iterable (list) of modules specifying type bindings- Returns:
- the newly created injector
- See Also:
create(Module...)
-
dispose
Dispose or release all data held by the Default Injector.- Parameters:
injector
- the default injector- Throws:
IllegalArgumentException
- if injector is not an instance of Default Injector
-