Class SlicesRuleDefinition
- java.lang.Object
-
- com.tngtech.archunit.library.dependencies.SlicesRuleDefinition
-
public final class SlicesRuleDefinition extends java.lang.ObjectAllows to specifyArchRulesfor "slices" of a code base. A slice is conceptually a cut through a code base according to business logic. Take for example
The top level packages under 'myapp' are composed according to different domain aspects. It is good practice, to keep such packages free of cycles, which is one capability that this class provides.com.mycompany.myapp.order com.mycompany.myapp.customer com.mycompany.myapp.user com.mycompany.myapp.authorization
Consider
Then this rule will assert, that the four slices of 'myapp' are free of cycles.slices().matching("..myapp.(*)..").should().beFreeOfCycles()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSlicesRuleDefinition.Creator
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SlicesRuleDefinition.Creatorslices()Entry point intoSlicesRuleDefinition
-
-
-
Method Detail
-
slices
@PublicAPI(usage=ACCESS) public static SlicesRuleDefinition.Creator slices()
Entry point intoSlicesRuleDefinition
-
-