Class ApplicationModuleDependencies
java.lang.Object
org.springframework.modulith.core.ApplicationModuleDependencies
The materialized, in other words actually present, dependencies of the current module towards other modules.
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(ApplicationModule module) Returns whether the dependencies contain the givenApplicationModule
.boolean
containsModuleNamed
(String name) Returns whether the dependencies contain theApplicationModule
with the given name.boolean
isEmpty()
Returns whether there are any dependencies at all.(package private) static ApplicationModuleDependencies
of
(List<ApplicationModuleDependency> dependencies, ApplicationModules modules) Creates a newApplicationModuleDependencies
for the givenList
ofApplicationModuleDependency
andApplicationModules
.stream()
Returns allApplicationModuleDependency
instances asStream
.uniqueStream
(Function<ApplicationModuleDependency, Object> extractor) Return allApplicationModuleDependency
instances unique by the value extracted using the givenFunction
.withType
(DependencyType type)
-
Method Details
-
of
static ApplicationModuleDependencies of(List<ApplicationModuleDependency> dependencies, ApplicationModules modules) Creates a newApplicationModuleDependencies
for the givenList
ofApplicationModuleDependency
andApplicationModules
.- Parameters:
dependencies
- must not be null.modules
- must not be null.- Returns:
- will never be null.
-
contains
Returns whether the dependencies contain the givenApplicationModule
.- Parameters:
module
- must not be null.- Returns:
- will never be null.
-
containsModuleNamed
Returns whether the dependencies contain theApplicationModule
with the given name.- Parameters:
name
- must not be null or empty.- Returns:
- will never be null.
-
stream
Returns allApplicationModuleDependency
instances asStream
.- Returns:
- will never be null.
-
uniqueStream
public Stream<ApplicationModuleDependency> uniqueStream(Function<ApplicationModuleDependency, Object> extractor) Return allApplicationModuleDependency
instances unique by the value extracted using the givenFunction
.- Parameters:
extractor
- will never be null.- Returns:
- will never be null.
-
withType
-
isEmpty
public boolean isEmpty()Returns whether there are any dependencies at all.- Returns:
- will never be null.
-