Interface GivenConstructorsConjunction
-
- All Superinterfaces:
GivenCodeUnitsConjunction<JavaConstructor>,GivenConjunction<JavaConstructor>,GivenMembersConjunction<JavaConstructor>
public interface GivenConstructorsConjunction extends GivenCodeUnitsConjunction<JavaConstructor>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GivenConstructorsConjunctionand(DescribedPredicate<? super JavaConstructor> predicate)Combines the current predicate (e.g.GivenConstructorsConjunctionor(DescribedPredicate<? super JavaConstructor> predicate)Combines the current predicate (e.g.-
Methods inherited from interface com.tngtech.archunit.lang.syntax.elements.GivenCodeUnitsConjunction
and, or, should, should
-
-
-
-
Method Detail
-
and
@PublicAPI(usage=ACCESS) GivenConstructorsConjunction and(DescribedPredicate<? super JavaConstructor> predicate)
Description copied from interface:GivenConjunctionCombines the current predicate (e.g.simpleName== 'SomeClass') with another predicate (e.g.resideInAPackage'foo.bar') using AND (i.e. both predicates must be satisfied).
NOTE:
GivenConjunction.and(DescribedPredicate)andGivenConjunction.or(DescribedPredicate)combine predicates in the sequence they are declared, without any "operator precedence". I.e.
all(objects()).that(predicateA).or(predicateB).and(predicateC)...will filter on predicate
(predicateA || predicateB) && predicateC, and
all(objects()).that(predicateA).and(predicateB).or(predicateC)...will filter on predicate
(predicateA && predicateB) || predicateC. If you need more control over the precedence, how predicates are joined, you have to join these predicates separately, i.e.
all(objects()).that(predicateA.or(predicateB.and(predicateC)))...- Specified by:
andin interfaceGivenCodeUnitsConjunction<JavaConstructor>- Specified by:
andin interfaceGivenConjunction<JavaConstructor>- Specified by:
andin interfaceGivenMembersConjunction<JavaConstructor>- Parameters:
predicate- The predicate to be ANDed on the current object filter predicate- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
or
@PublicAPI(usage=ACCESS) GivenConstructorsConjunction or(DescribedPredicate<? super JavaConstructor> predicate)
Description copied from interface:GivenConjunctionCombines the current predicate (e.g.simpleName== 'SomeClass') with another predicate (e.g.resideInAPackage'foo.bar') using OR (i.e. at least one of the predicates must be satisfied).
NOTE: For considerations about precedence, when joining predicates, consider note at
GivenConjunction.and(DescribedPredicate)- Specified by:
orin interfaceGivenCodeUnitsConjunction<JavaConstructor>- Specified by:
orin interfaceGivenConjunction<JavaConstructor>- Specified by:
orin interfaceGivenMembersConjunction<JavaConstructor>- Parameters:
predicate- The predicate to be ORed on the current object filter predicate- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
-