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
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ApplicationModuleSourcefrom(JavaPackage pkg, String name) Creates a newApplicationModuleSourcefor the givenJavaPackageand name.static Stream<ApplicationModuleSource>from(JavaPackage pkg, ApplicationModuleDetectionStrategy strategy, boolean fullyQualifiedModuleNames) Returns aStreamofApplicationModuleSources by applying the givenApplicationModuleDetectionStrategyto the given base package.inthashCode()
-
Method Details
-
from
public static Stream<ApplicationModuleSource> from(JavaPackage pkg, ApplicationModuleDetectionStrategy strategy, boolean fullyQualifiedModuleNames) Returns aStreamofApplicationModuleSources by applying the givenApplicationModuleDetectionStrategyto the given base package.- Parameters:
pkg- must not be null.strategy- must not be null.fullyQualifiedModuleNames- whether to use fully qualified module names.- Returns:
- will never be null.
-
from
Creates a newApplicationModuleSourcefor the givenJavaPackageand name.- Parameters:
pkg- must not be null.name- must not be null or empty.- Returns:
- will never be null.
-
getModuleBasePackage
- Returns:
- will never be null.
-
getModuleName
- Returns:
- will never be null or empty.
-
equals
-
hashCode
public int hashCode()
-