public final class Slices extends java.lang.Object implements DescribedIterable<Slice>
Slice
for tests on dependencies of package slices, e.g. to avoid cycles.
Example to specify a ClassesTransformer
to run ArchRules
against Slices
:
Slices.matching("some.pkg.(*)..")
would group the packages
some.pkg.one.any
some.pkg.one.other
some.pkg.two.any
ClassesTransformer
can be used to specify an ArchRule
on slices.Modifier and Type | Class and Description |
---|---|
static class |
Slices.Creator |
static class |
Slices.Transformer
|
DescribedIterable.From
Modifier and Type | Method and Description |
---|---|
Slices |
as(java.lang.String description) |
java.lang.String |
getDescription() |
java.util.Iterator<Slice> |
iterator() |
static Slices.Transformer |
matching(java.lang.String packageIdentifier) |
Slices |
namingSlices(java.lang.String pattern)
Allows the naming of single slices, where back references to the matching pattern can be denoted by '$' followed
by capturing group number.
|
public java.util.Iterator<Slice> iterator()
iterator
in interface java.lang.Iterable<Slice>
public Slices as(java.lang.String description)
public java.lang.String getDescription()
getDescription
in interface HasDescription
public Slices namingSlices(java.lang.String pattern)
namingSlices("Slice $1")
would name a slice matching '*..service.(*)..*'
against 'com.some.company.service.hello.something'
as 'Slice hello'.pattern
- The naming pattern, e.g. 'Slice $1'public static Slices.Transformer matching(java.lang.String packageIdentifier)
Slices.Creator.matching(String)