Class ApplicationModuleSource
java.lang.Object
org.springframework.modulith.core.ApplicationModuleSource
The source of an 
ApplicationModule. Essentially a JavaPackage and associated naming strategy for the
 module. This will be used when constructing sources from a base package and an
 ApplicationModuleDetectionStrategy so that the names of the module to be created for the detected packages
 become the trailing name underneath the base package. For example, scanning from com.acme, an
 ApplicationModule located in com.acme.foo.bar would be named foo.bar.- Since:
- 1.3
- Author:
- Oliver Drotbohm
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescription(package private) static interfaceAn intermediate abstraction to detect both theApplicationModuleIdentifierand potentially nested module declarations for theJavaPackages returned from the first pass of module detection.
- 
Method SummaryModifier and TypeMethodDescriptionboolean(package private) static ApplicationModuleSourcefrom(JavaPackage pkg, String identifier) Creates a newApplicationModuleSourcefor the givenJavaPackageand name.static Stream<ApplicationModuleSource>from(JavaPackage rootPackage, ApplicationModuleDetectionStrategy strategy, boolean fullyQualifiedModuleNames) Returns aStreamofApplicationModuleSources by applying the givenApplicationModuleDetectionStrategyto the given base package.(package private) ApplicationModuleIdentifierReturns theApplicationModuleIdentifierto be used for the module.(package private) JavaPackageReturns the base package for the module.(package private) NamedInterfacesgetNamedInterfaces(ApplicationModuleInformation information) Returns allNamedInterfacesfor the givenApplicationModuleInformation.(package private) NamedInterfacesgetNamedInterfaces(ApplicationModuleInformation information, JavaPackage basePackage) Returns allNamedInterfacesfor the givenApplicationModuleInformationand a customizedJavaPackage.inthashCode()toString()
- 
Method Details- 
frompublic static Stream<ApplicationModuleSource> from(JavaPackage rootPackage, ApplicationModuleDetectionStrategy strategy, boolean fullyQualifiedModuleNames) Returns aStreamofApplicationModuleSources by applying the givenApplicationModuleDetectionStrategyto the given base package.- Parameters:
- rootPackage- must not be null.
- strategy- must not be null.
- fullyQualifiedModuleNames- whether to use fully qualified module names.
- Returns:
- will never be null.
 
- 
fromCreates a newApplicationModuleSourcefor the givenJavaPackageand name.- Parameters:
- pkg- must not be null.
- identifier- must not be null or empty.
- Returns:
- will never be null.
 
- 
getModuleBasePackageJavaPackage getModuleBasePackage()Returns the base package for the module.- Returns:
- will never be null.
 
- 
getIdentifierApplicationModuleIdentifier getIdentifier()Returns theApplicationModuleIdentifierto be used for the module.- Returns:
- will never be null.
 
- 
getNamedInterfacesReturns allNamedInterfacesfor the givenApplicationModuleInformation.- Parameters:
- information- must not be null.
- Returns:
- will never be null.
- Since:
- 1.4
 
- 
getNamedInterfacesNamedInterfaces getNamedInterfaces(ApplicationModuleInformation information, JavaPackage basePackage) Returns allNamedInterfacesfor the givenApplicationModuleInformationand a customizedJavaPackage.- Parameters:
- information- must not be null.
- Returns:
- will never be null.
- Since:
- 1.4.2
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-