Package com.tngtech.archunit.lang
Class AbstractClassesTransformer<T>
java.lang.Object
com.tngtech.archunit.lang.AbstractClassesTransformer<T>
- All Implemented Interfaces:
HasDescription
,ClassesTransformer<T>
@PublicAPI(usage=INHERITANCE)
public abstract class AbstractClassesTransformer<T>
extends Object
implements ClassesTransformer<T>
Default base implementation of
ClassesTransformer
, where only doTransform(JavaClasses)
has to be implemented, while description and filtering via that(DescribedPredicate)
are provided.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal ClassesTransformer<T>
doTransform
(JavaClasses collection) final String
final ClassesTransformer<T>
that
(DescribedPredicate<? super T> predicate) Can be used to further filter the transformation result.toString()
final DescribedIterable<T>
transform
(JavaClasses collection) Defines how to transform importedJavaClasses
to the respective objects to test.
-
Constructor Details
-
AbstractClassesTransformer
-
-
Method Details
-
transform
Description copied from interface:ClassesTransformer
Defines how to transform importedJavaClasses
to the respective objects to test.- Specified by:
transform
in interfaceClassesTransformer<T>
- Parameters:
collection
- ImportedJavaClasses
- Returns:
- A
DescribedIterable
holding the transformed objects - See Also:
-
doTransform
-
that
Description copied from interface:ClassesTransformer
Can be used to further filter the transformation result.- Specified by:
that
in interfaceClassesTransformer<T>
- 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
-
as
- Specified by:
as
in interfaceClassesTransformer<T>
- Parameters:
description
- A new description for this transformer- Returns:
- A transformer for the same transformation with an adjusted description
-
toString
-