Package com.tngtech.archunit.library
Class Architectures.LayeredArchitecture.LayerDependencySpecification
java.lang.Object
com.tngtech.archunit.library.Architectures.LayeredArchitecture.LayerDependencySpecification
- Enclosing class:
- Architectures.LayeredArchitecture
@PublicAPI(usage=ACCESS)
public final class Architectures.LayeredArchitecture.LayerDependencySpecification
extends Object
-
Method Summary
Modifier and TypeMethodDescriptionForbids anydependencyfrom this layer to any other layer.Forbids anydependencyfrom another layer to this layer.mayOnlyAccessLayers(String... layerNames) Restricts this layer to only allowdependenciesto the specified layers.mayOnlyBeAccessedByLayers(String... layerNames) Restricts this layer to only allow the specified layers to havedependenciesto this layer.toString()
-
Method Details
-
mayNotBeAccessedByAnyLayer
Forbids anydependencyfrom another layer to this layer.- Returns:
- a
Architectures.LayeredArchitectureto be used as anArchRuleor further restricted through a fluent API.
-
mayOnlyBeAccessedByLayers
@PublicAPI(usage=ACCESS) public Architectures.LayeredArchitecture mayOnlyBeAccessedByLayers(String... layerNames) Restricts this layer to only allow the specified layers to havedependenciesto this layer.- Parameters:
layerNames- the names of other layers (as specified byArchitectures.LayeredArchitecture.layer(String)) that may access this layer- Returns:
- a
Architectures.LayeredArchitectureto be used as anArchRuleor further restricted through a fluent API.
-
mayNotAccessAnyLayer
Forbids anydependencyfrom this layer to any other layer.- Returns:
- a
Architectures.LayeredArchitectureto be used as anArchRuleor further restricted through a fluent API.
-
mayOnlyAccessLayers
@PublicAPI(usage=ACCESS) public Architectures.LayeredArchitecture mayOnlyAccessLayers(String... layerNames) Restricts this layer to only allowdependenciesto the specified layers.- Parameters:
layerNames- the only names of other layers (as specified byArchitectures.LayeredArchitecture.layer(String)) that this layer may access- Returns:
- a
Architectures.LayeredArchitectureto be used as anArchRuleor further restricted through a fluent API.
-
toString
-