SlicesRuleBuilder
A builder for compiling and verifying architectural rules on slices — groups of packages derived from a package pattern with a capture group.
A slice pattern such as com.acme.(*).. partitions the matched packages into slices keyed by the captured segment, and the assertions on SlicesShould verify relationships between those slices (for example, that they are free of cyclic dependencies).
Constructors
Functions
Configures this builder to allow empty selections (if no packages match the slice pattern the rule passes instead of throwing an AssertionError).
Logical AND operator for chaining filter conditions.
Logical AND operator for chaining assertion rules.
Executes the compiled slice rules against the provided project graph. Throws an AssertionError if any rule violations are detected.
Sets the slice pattern. It must contain exactly one capture group: (*) for one package segment or (**) for one or more segments. The captured text becomes the slice key.
Negates the next filter condition.
Negates the next assertion rule.
Logical OR operator for chaining filter conditions.
Logical OR operator for chaining assertion rules.
Debugging helper that prints information about all derived slices in the project graph.
Debugging helper that prints information about all slices derived from the slice pattern.
Starts adding assertion rules that the derived slices must satisfy.
Asserts rules on slices using a lambda block that provides a SliceShouldContext receiver.
Configures programmatic violation suppressions for this slice rule suite with mandatory audit rationale.
Starts filtering conditions to select which slices to verify.
Filters slices in this rule using a concise lambda predicate evaluated on each Slice.
Logical XOR operator for chaining filter conditions.
Logical XOR operator for chaining assertion rules.