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 importedJavaClassesto the respective objects to test.transform(Iterable<Dependency> dependencies)
-
Method Details
-
as
- Specified by:
asin 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:ClassesTransformerDefines how to transform importedJavaClassesto the respective objects to test.- Specified by:
transformin interfaceClassesTransformer<Slice>- Parameters:
classes- ImportedJavaClasses- Returns:
- A
DescribedIterableholding the transformed objects - See Also:
-
that
Description copied from interface:ClassesTransformerCan be used to further filter the transformation result.- Specified by:
thatin interfaceClassesTransformer<Slice>- Parameters:
predicate- Predicate to filter the collection of transformed objects- Returns:
- A transformer that additionally filters the transformed result
-
getDescription
- Specified by:
getDescriptionin interfaceHasDescription
-