From 51bf9ac867cc27e8e82f44a1eeed3b6b85c95072 Mon Sep 17 00:00:00 2001 From: Mikhail Polivakha <68962645+mipo256@users.noreply.github.com> Date: Sat, 19 Oct 2024 11:50:18 +0300 Subject: [PATCH] Clarified Slices documentation The slices documentation does not mention a very important aspect, that is that, technically, Slices do not represent a given set of packages, although the example shows that. Signed-off-by: mipo256 --- .../com/tngtech/archunit/library/dependencies/Slice.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/archunit/src/main/java/com/tngtech/archunit/library/dependencies/Slice.java b/archunit/src/main/java/com/tngtech/archunit/library/dependencies/Slice.java index 796e4b346..2a8bdd306 100644 --- a/archunit/src/main/java/com/tngtech/archunit/library/dependencies/Slice.java +++ b/archunit/src/main/java/com/tngtech/archunit/library/dependencies/Slice.java @@ -47,6 +47,11 @@ * The top level packages under 'myapp' could be considered slices according to different domain aspects.
* Thus there could be a slice 'Order' housing all the classes from the {@code order} package, a slice 'Customer' * housing all the classes from the {@code customer} package and so on. + *

+ * Note that a {@link Slice} does not necessarily represent a subpackage inside some root package. + * The example above is just a common use case, but a {@link Slice} can technically represent any set + * of {@link JavaClass}es. + *

*/ @PublicAPI(usage = ACCESS) public final class Slice extends ForwardingSet implements HasDescription, CanOverrideDescription {