Interface ApplicationModuleDetectionStrategy
public interface ApplicationModuleDetectionStrategy
Strategy interface to customize which packages are considered module base packages.
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptiondefault NamedInterfaces
detectNamedInterfaces
(JavaPackage basePackage, ApplicationModuleInformation information) Optionally customize the detection ofNamedInterfaces
for a module with the given base package and the pre-obtainedApplicationModuleInformation
.AApplicationModuleDetectionStrategy
that considers all direct sub-packages of the Moduliths base package to be module base packages.AApplicationModuleDetectionStrategy
that considers packages explicitly annotated withApplicationModule
module base packages.Deprecated, for removal: This API element is subject to removal in a future version.since 1.3.getModuleBasePackages
(JavaPackage rootPackage) Given theJavaPackage
that Spring Modulith was initialized with, return the base packages that are supposed to be considered base packages forApplicationModule
s.
-
Method Details
-
getModuleBasePackages
Given theJavaPackage
that Spring Modulith was initialized with, return the base packages that are supposed to be considered base packages forApplicationModule
s.- Parameters:
rootPackage
- will never be null.- Returns:
- must not be null.
-
detectNamedInterfaces
default NamedInterfaces detectNamedInterfaces(JavaPackage basePackage, ApplicationModuleInformation information) Optionally customize the detection ofNamedInterfaces
for a module with the given base package and the pre-obtainedApplicationModuleInformation
. Defaults toNamedInterfaces.of(JavaPackage, ApplicationModuleInformation)
.NamedInterfaces
exposes aNamedInterfaces.Builder
API 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
AApplicationModuleDetectionStrategy
that considers all direct sub-packages of the Moduliths base package to be module base packages.- Returns:
- will never be null.
-
explictlyAnnotated
Deprecated, for removal: This API element is subject to removal in a future version.since 1.3. UseexplicitlyAnnotated()
instead.AApplicationModuleDetectionStrategy
that considers packages explicitly annotated withApplicationModule
module base packages.- Returns:
- will never be null.
-
explicitlyAnnotated
AApplicationModuleDetectionStrategy
that considers packages explicitly annotated withApplicationModule
module base packages.- Returns:
- will never be null.
-