Class Slices.Transformer
- java.lang.Object
-
- com.tngtech.archunit.library.dependencies.Slices.Transformer
-
- All Implemented Interfaces:
HasDescription,ClassesTransformer<Slice>
- Enclosing class:
- Slices
public static class Slices.Transformer extends java.lang.Object implements ClassesTransformer<Slice>
Specifies how to transform a set ofJavaClassinto a set ofSlice, e.g. to test that no cycles between certain package slices appear.- See Also:
Slices
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Slices.Transformeras(java.lang.String description)java.lang.StringgetDescription()Slicesof(JavaClasses classes)Slices.Transformerthat(DescribedPredicate<? super Slice> predicate)Can be used to further filter the transformation result.Slicestransform(JavaClasses classes)Defines how to transform importedJavaClassesto the respective objects to test.Slicestransform(java.lang.Iterable<Dependency> dependencies)
-
-
-
Method Detail
-
as
public Slices.Transformer as(java.lang.String description)
- 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
public Slices of(JavaClasses classes)
-
transform
public Slices transform(java.lang.Iterable<Dependency> dependencies)
-
transform
public Slices transform(JavaClasses classes)
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:
Slices.Transformer
-
that
public Slices.Transformer that(DescribedPredicate<? super Slice> predicate)
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
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceHasDescription
-
-