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 ofJavaClass
into 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.Transformer
as(java.lang.String description)
java.lang.String
getDescription()
Slices
of(JavaClasses classes)
Slices.Transformer
that(DescribedPredicate<? super Slice> predicate)
Can be used to further filter the transformation result.Slices
transform(JavaClasses classes)
Defines how to transform importedJavaClasses
to the respective objects to test.Slices
transform(java.lang.Iterable<Dependency> dependencies)
-
-
-
Method Detail
-
as
public Slices.Transformer as(java.lang.String description)
- 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
public Slices of(JavaClasses classes)
-
transform
public Slices transform(java.lang.Iterable<Dependency> dependencies)
-
transform
public Slices transform(JavaClasses classes)
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:
Slices.Transformer
-
that
public Slices.Transformer that(DescribedPredicate<? super Slice> predicate)
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
public java.lang.String getDescription()
- Specified by:
getDescription
in interfaceHasDescription
-
-