Interface ApplicationModuleDetectionStrategy
public interface ApplicationModuleDetectionStrategy
Strategy interface to customize which packages are considered module base packages.
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptiondefault NamedInterfacesdetectNamedInterfaces(JavaPackage basePackage, ApplicationModuleInformation information) Optionally customize the detection ofNamedInterfacesfor a module with the given base package and the pre-obtainedApplicationModuleInformation.AApplicationModuleDetectionStrategythat considers all direct sub-packages of the Moduliths base package to be module base packages.AApplicationModuleDetectionStrategythat considers packages explicitly annotated withApplicationModulemodule base packages.getModuleBasePackages(JavaPackage rootPackage) Given theJavaPackagethat Spring Modulith was initialized with, return the base packages that are supposed to be considered base packages forApplicationModules.
-
Method Details
-
getModuleBasePackages
Given theJavaPackagethat Spring Modulith was initialized with, return the base packages that are supposed to be considered base packages forApplicationModules.- Parameters:
rootPackage- will never be null.- Returns:
- must not be null.
-
detectNamedInterfaces
default NamedInterfaces detectNamedInterfaces(JavaPackage basePackage, ApplicationModuleInformation information) Optionally customize the detection ofNamedInterfacesfor a module with the given base package and the pre-obtainedApplicationModuleInformation. Defaults toNamedInterfaces.of(JavaPackage, ApplicationModuleInformation).NamedInterfacesexposes aNamedInterfaces.BuilderAPI to define the selection of packages to be considered named interfaces.- Parameters:
basePackage- will never be null.information- will never be null.- Returns:
- must not be null.
- Since:
- 1.4
- See Also:
-
directSubPackage
AApplicationModuleDetectionStrategythat considers all direct sub-packages of the Moduliths base package to be module base packages.- Returns:
- will never be null.
-
explicitlyAnnotated
AApplicationModuleDetectionStrategythat considers packages explicitly annotated withApplicationModulemodule base packages.- Returns:
- will never be null.
-