Package io.activej.inject.module
Class Modules
java.lang.Object
io.activej.inject.module.Modules
This class contains a set of utilities for working with
modules.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ModuleCombines multiple modules into one.static Modulecombine(Collection<Module> modules) Combines multiple modules into one.static ModuleignoreScopes(Module from) Creates a module with all trie nodes merged into one and placed at root.static ModuleConsecutively overrides each of the given modules with the next one after it and returns the accumulated result.static ModuleThis method creates a module that has bindings, transformers, generators and multibinders from first module replaced with bindings, transformers, generators and multibinders from the second module.static ModuleConsecutively overrides each of the given modules with the next one after it and returns the accumulated result.static Moduleremap(Module module, BiFunction<Scope[], Key<?>, Key<?>> exportsMapping, BiFunction<Scope[], Key<?>, Key<?>> importsMapping) static Moduleremap(Module module, UnaryOperator<Key<?>> remapping) static Modulestatic Modulestatic Modulerestrict(Module module, BiPredicate<Scope[], Key<?>> exportsPredicate) static Modulestatic Module
-
Constructor Details
-
Modules
public Modules()
-
-
Method Details
-
combine
Combines multiple modules into one. -
combine
Combines multiple modules into one.- See Also:
-
override
Consecutively overrides each of the given modules with the next one after it and returns the accumulated result. -
override
Consecutively overrides each of the given modules with the next one after it and returns the accumulated result.- See Also:
-
override
This method creates a module that has bindings, transformers, generators and multibinders from first module replaced with bindings, transformers, generators and multibinders from the second module. -
ignoreScopes
Creates a module with all trie nodes merged into one and placed at root. Basically, any scopes are ignored. This is useful for some tests. -
getImports
-
remap
-
remap
-
remap
public static Module remap(Module module, BiFunction<Scope[], Key<?>, Key<?>> exportsMapping, BiFunction<Scope[], Key<?>, Key<?>> importsMapping) -
restrict
-
restrict
-
restrict
-
restrict
-