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 anydependency
from this layer to any other layer.Forbids anydependency
from another layer to this layer.mayOnlyAccessLayers
(String... layerNames) Restricts this layer to only allowdependencies
to the specified layers.mayOnlyBeAccessedByLayers
(String... layerNames) Restricts this layer to only allow the specified layers to havedependencies
to this layer.toString()
-
Method Details
-
mayNotBeAccessedByAnyLayer
Forbids anydependency
from another layer to this layer.- Returns:
- a
Architectures.LayeredArchitecture
to be used as anArchRule
or 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 havedependencies
to this layer.- Parameters:
layerNames
- the names of other layers (as specified byArchitectures.LayeredArchitecture.layer(String)
) that may access this layer- Returns:
- a
Architectures.LayeredArchitecture
to be used as anArchRule
or further restricted through a fluent API.
-
mayNotAccessAnyLayer
Forbids anydependency
from this layer to any other layer.- Returns:
- a
Architectures.LayeredArchitecture
to be used as anArchRule
or further restricted through a fluent API.
-
mayOnlyAccessLayers
@PublicAPI(usage=ACCESS) public Architectures.LayeredArchitecture mayOnlyAccessLayers(String... layerNames) Restricts this layer to only allowdependencies
to 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.LayeredArchitecture
to be used as anArchRule
or further restricted through a fluent API.
-
toString
-