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
Returns whether the dependencies contain the type with the given fully-qualified name.boolean
contains
(ApplicationModule module) Returns whether the dependencies contain the givenApplicationModule
.boolean
containsModuleNamed
(String name) Returns whether the dependencies contain theApplicationModule
with the given name.getModuleByType
(String name) Returns theApplicationModule
containing the given type.boolean
isEmpty()
Returns whether there are any dependencies at all.(package private) static ApplicationModuleDependencies
of
(List<ApplicationModuleDependency> dependencies) stream()
Returns allApplicationModuleDependency
instances asStream
.Returns all uniqueApplicationModule
s involved in the dependencies.uniqueStream
(Function<ApplicationModuleDependency, Object> extractor) Return allApplicationModuleDependency
instances unique by the value extracted using the givenFunction
.withType
(DependencyType type) Returns a newApplicationModuleDependencies
instance containing only the dependencies of the givenDependencyType
.
-
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 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
Returns a newApplicationModuleDependencies
instance 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 uniqueApplicationModule
s involved in the dependencies.- Returns:
- will never be null.
-
getModuleByType
Returns theApplicationModule
containing the given type.- Parameters:
name
- must not be null or empty.- Returns:
- will never be null.
-