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.Deprecated, for removal: This API element is subject to removal in a future version.since 1.3.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.
-
explictlyAnnotated
Deprecated, for removal: This API element is subject to removal in a future version.since 1.3. UseexplicitlyAnnotated()instead.AApplicationModuleDetectionStrategythat considers packages explicitly annotated withApplicationModulemodule base packages.- Returns:
- will never be null.
-
explicitlyAnnotated
AApplicationModuleDetectionStrategythat considers packages explicitly annotated withApplicationModulemodule base packages.- Returns:
- will never be null.
-