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 SummaryModifier 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- 
ofstatic 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.
 
- 
containsReturns whether the dependencies contain the givenApplicationModule.- Parameters:
- module- must not be null.
- Returns:
- will never be null.
 
- 
containsModuleNamedReturns whether the dependencies contain theApplicationModulewith the given name.- Parameters:
- name- must not be null or empty.
- Returns:
- will never be null.
 
- 
streamReturns allApplicationModuleDependencyinstances asStream.- Returns:
- will never be null.
 
- 
uniqueStreampublic 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
- 
isEmptypublic boolean isEmpty()Returns whether there are any dependencies at all.- Returns:
- will never be null.
 
 
-