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
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the dependencies contain the type with the given fully-qualified name.booleancontains(ApplicationModule module) Returns whether the dependencies contain the givenApplicationModule.booleancontainsModuleNamed(String name) Returns whether the dependencies contain theApplicationModulewith the given name.getModuleByType(String name) Returns theApplicationModulecontaining the given type.booleanisEmpty()Returns whether there are any dependencies at all.(package private) static ApplicationModuleDependenciesof(List<ApplicationModuleDependency> dependencies) stream()Returns allApplicationModuleDependencyinstances asStream.Returns all uniqueApplicationModules involved in the dependencies.uniqueStream(Function<ApplicationModuleDependency, Object> extractor) Return allApplicationModuleDependencyinstances unique by the value extracted using the givenFunction.withType(DependencyType type) Returns a newApplicationModuleDependenciesinstance containing only the dependencies of the givenDependencyType.
-
Field Details
-
NONE
-
-
Method Details
-
of
- Parameters:
dependencies- 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
Returns a newApplicationModuleDependenciesinstance containing only the dependencies of the givenDependencyType.- Parameters:
type- must not be null.- Returns:
-
isEmpty
public boolean isEmpty()Returns whether there are any dependencies at all.- Returns:
- will never be null.
-
contains
Returns whether the dependencies contain the type with the given fully-qualified name.- Parameters:
type- must not be null or empty.- Returns:
- Since:
- 1.3
-
uniqueModules
Returns all uniqueApplicationModules involved in the dependencies.- Returns:
- will never be null.
-
getModuleByType
Returns theApplicationModulecontaining the given type.- Parameters:
name- must not be null or empty.- Returns:
- will never be null.
-