Class ApplicationModule.DeclaredDependency
java.lang.Object
org.springframework.modulith.core.ApplicationModule.DeclaredDependency
- Enclosing class:
- ApplicationModule
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(com.tngtech.archunit.core.domain.JavaClass type) Returns whether theApplicationModule.DeclaredDependency
contains the givenJavaClass
.(package private) boolean
Returns whether theApplicationModule.DeclaredDependency
contains the givenClass
.boolean
int
hashCode()
of
(String identifier, ApplicationModule source, ApplicationModules modules) Creates anApplicationModule.DeclaredDependency
to the module and optionally named interface defined by the given identifier.to
(ApplicationModule module) Creates a newApplicationModule.DeclaredDependency
to the unnamed interface of the givenApplicationModule
.toString()
-
Method Details
-
of
public static ApplicationModule.DeclaredDependency of(String identifier, ApplicationModule source, ApplicationModules modules) Creates anApplicationModule.DeclaredDependency
to the module and optionally named interface defined by the given identifier.- Parameters:
identifier
- must not be null or empty. Follows the${moduleName}(::${namedInterfaceName})
pattern.source
- the source module of the dependency, must not be null.modules
- must not be null.- Returns:
- will never be null.
- Throws:
IllegalArgumentException
- in case the given identifier is invalid, i.e. does not refer to an existing module or named interface.
-
to
Creates a newApplicationModule.DeclaredDependency
to the unnamed interface of the givenApplicationModule
.- Parameters:
module
- must not be null.- Returns:
-
contains
public boolean contains(com.tngtech.archunit.core.domain.JavaClass type) Returns whether theApplicationModule.DeclaredDependency
contains the givenJavaClass
.- Parameters:
type
- must not be null.- Returns:
-
contains
Returns whether theApplicationModule.DeclaredDependency
contains the givenClass
.- Parameters:
type
- must not be null.- Returns:
-
toString
-
equals
-
hashCode
public int hashCode()
-