Interface GivenModulesByAnnotation<ANNOTATION extends Annotation>
- All Superinterfaces:
GivenModules<AnnotationDescriptor<ANNOTATION>>,GivenObjects<ArchModule<AnnotationDescriptor<ANNOTATION>>>
@PublicAPI(usage=ACCESS,
state=EXPERIMENTAL)
public interface GivenModulesByAnnotation<ANNOTATION extends Annotation>
extends GivenModules<AnnotationDescriptor<ANNOTATION>>
-
Method Summary
Modifier and TypeMethodDescriptionshould()Allows to specify assertions for the set ofArchModules under consideration.that(DescribedPredicate<? super ArchModule<AnnotationDescriptor<ANNOTATION>>> predicate) Allows to restrict the set of objects under consideration.Methods inherited from interface com.tngtech.archunit.library.modules.syntax.GivenModules
asMethods inherited from interface com.tngtech.archunit.lang.syntax.elements.GivenObjects
should
-
Method Details
-
that
GivenModulesByAnnotationConjunction<ANNOTATION> that(DescribedPredicate<? super ArchModule<AnnotationDescriptor<ANNOTATION>>> predicate) Description copied from interface:GivenObjectsAllows to restrict the set of objects under consideration. E.g.
Note that many predefinedall(customObjects).that(predicate)predicatescan be found within a subclassPredicatesof the respective domain object or a common ancestor. For example,predicatestargetingJavaClasscan be found withinJavaClass.Predicatesor one of the respective ancestors likeHasName.Predicates.- Specified by:
thatin interfaceGivenModules<ANNOTATION extends Annotation>- Specified by:
thatin interfaceGivenObjects<ANNOTATION extends Annotation>- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
should
Description copied from interface:GivenModulesAllows to specify assertions for the set ofArchModules under consideration. E.g.
modules().should().respectTheirAllowedDependencies(..)
UseGivenObjects.should(ArchCondition)to freely customize the condition against which theArchModules should be checked.- Specified by:
shouldin interfaceGivenModules<ANNOTATION extends Annotation>- Returns:
- A syntax element, which can be used to create rules for the
ArchModules under consideration
-