Class Slices.Transformer
java.lang.Object
com.tngtech.archunit.library.dependencies.Slices.Transformer
- All Implemented Interfaces:
HasDescription
,ClassesTransformer<Slice>
- Enclosing class:
- Slices
@PublicAPI(usage=ACCESS)
public static class Slices.Transformer
extends Object
implements ClassesTransformer<Slice>
Specifies how to transform a set of
JavaClass
into a set of Slice
, e.g. to test that
no cycles between certain package slices appear.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionof
(JavaClasses classes) that
(DescribedPredicate<? super Slice> predicate) Can be used to further filter the transformation result.transform
(JavaClasses classes) Defines how to transform importedJavaClasses
to the respective objects to test.transform
(Iterable<Dependency> dependencies)
-
Method Details
-
as
- Specified by:
as
in interfaceClassesTransformer<Slice>
- Parameters:
description
- A new description for this transformer- Returns:
- A transformer for the same transformation with an adjusted description
-
of
-
transform
-
transform
Description copied from interface:ClassesTransformer
Defines how to transform importedJavaClasses
to the respective objects to test.- Specified by:
transform
in interfaceClassesTransformer<Slice>
- Parameters:
classes
- ImportedJavaClasses
- Returns:
- A
DescribedIterable
holding the transformed objects - See Also:
-
that
Description copied from interface:ClassesTransformer
Can be used to further filter the transformation result.- Specified by:
that
in interfaceClassesTransformer<Slice>
- Parameters:
predicate
- Predicate to filter the collection of transformed objects- Returns:
- A transformer that additionally filters the transformed result
-
getDescription
- Specified by:
getDescription
in interfaceHasDescription
-