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 TypeMethodDescriptionbooleancontains(ApplicationModule module) Returns whether the dependencies contain the givenApplicationModule.booleancontainsModuleNamed(String name) Returns whether the dependencies contain theApplicationModulewith the given name.booleanisEmpty()Returns whether there are any dependencies at all.(package private) static ApplicationModuleDependenciesof(List<ApplicationModuleDependency> dependencies, ApplicationModules modules) Creates a newApplicationModuleDependenciesfor the givenListofApplicationModuleDependencyandApplicationModules.stream()Returns allApplicationModuleDependencyinstances asStream.uniqueStream(Function<ApplicationModuleDependency, Object> extractor) Return allApplicationModuleDependencyinstances unique by the value extracted using the givenFunction.withType(DependencyType type)
-
Method Details
-
of
static ApplicationModuleDependencies of(List<ApplicationModuleDependency> dependencies, ApplicationModules modules) Creates a newApplicationModuleDependenciesfor the givenListofApplicationModuleDependencyandApplicationModules.- 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 theApplicationModulewith the given name.- Parameters:
name- must not be null or empty.- Returns:
- will never be null.
-
stream
Returns allApplicationModuleDependencyinstances asStream.- Returns:
- will never be null.
-
uniqueStream
public Stream<ApplicationModuleDependency> uniqueStream(Function<ApplicationModuleDependency, Object> extractor) Return allApplicationModuleDependencyinstances 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.
-