- All Superinterfaces:
BiFunction<Container,Properties,Container>
- All Known Implementing Classes:
Application,ModuleBuilder
public interface Module extends BiFunction<Container,Properties,Container>
The Module interface represents a logic grouping of common
BeanDefinition objects which need to be added to the container.
Modules are loaded using the Java Service Loader by registering a net.odoframework.container.Module file in META-INF/services or via your module-info.java file in JPMS environments
The module is an instance of a BiFunction and the BiFunction.apply(T, U) method is called taking the Container as a parameter.
Module authors should not implement this class but rather implement the ModuleBuilder or Application classes
-
Method Summary
Modifier and Type Method Description default Set<Module>getDependencies()default intgetPrecedence()returns the precedence for when the module needs to be loaded.Methods inherited from interface java.util.function.BiFunction
andThen, apply
-
Method Details
-
getPrecedence
default int getPrecedence()returns the precedence for when the module needs to be loaded. the lower the returned number the earlier the load precedence.Precedence values below zero are reserved for odo system modules.
- Returns:
- the precedence number to return, default is 0
-
getDependencies
-