-
Notifications
You must be signed in to change notification settings - Fork 325
Open
Description
I slice and layer to get module boundaries.
The pain I'm experiencing is that a slices() has matching(String) but for layers I can pass a DescribedPredicate this is resulting in code duplication, and exposing strings.
this is also related to #1534 in that I want to use some of the same predicates or sub predicates, as the layer predicates are often using and( and or( from what I would use for slices
slices().that(resideInAPackage("domain.aggregate.(*)"))static class Domain {
static DescribedPredicate<JavaClass> AGGREGATE = residesInAPackage("domain.aggregate.(*)")
static DescribedPredicate<JavaClass> SERVICE = residesInAPackage("domain.service")
static Layer layer() {
return new Layer("Domain", or(AGGREGATE, SERVICE);
}
}
slices()
.that(Domain.AGGREGATE) // note: layer is a value object and thus any instance with the same
value...
.should()
.notDependOnEachOther()Metadata
Metadata
Assignees
Labels
No labels