Interface GivenMethodsConjunction
- All Superinterfaces:
GivenCodeUnitsConjunction<JavaMethod>,GivenConjunction<JavaMethod>,GivenMembersConjunction<JavaMethod>
@PublicAPI(usage=ACCESS)
public interface GivenMethodsConjunction
extends GivenCodeUnitsConjunction<JavaMethod>
-
Method Summary
Modifier and TypeMethodDescriptionMethodsThat<? extends GivenMethodsConjunction>and()LikeGivenMembersConjunction.and(DescribedPredicate)but allows to pick the predicate to join by a fluent API.and(DescribedPredicate<? super JavaMethod> predicate) Combines the current predicate (e.g.MethodsThat<? extends GivenMethodsConjunction>or()LikeGivenMembersConjunction.or(DescribedPredicate)but allows to pick the predicate to join by a fluent API.or(DescribedPredicate<? super JavaMethod> predicate) Combines the current predicate (e.g.should()LikeGivenMembersConjunction.should(ArchCondition)but allows to pick the condition to join by a fluent API.should(ArchCondition<? super JavaMethod> condition)
-
Method Details
-
and
Description copied from interface:GivenMembersConjunctionLikeGivenMembersConjunction.and(DescribedPredicate)but allows to pick the predicate to join by a fluent API.- Specified by:
andin interfaceGivenCodeUnitsConjunction<JavaMethod>- Specified by:
andin interfaceGivenMembersConjunction<JavaMethod>
-
or
Description copied from interface:GivenMembersConjunctionLikeGivenMembersConjunction.or(DescribedPredicate)but allows to pick the predicate to join by a fluent API.- Specified by:
orin interfaceGivenCodeUnitsConjunction<JavaMethod>- Specified by:
orin interfaceGivenMembersConjunction<JavaMethod>
-
and
@PublicAPI(usage=ACCESS) GivenMethodsConjunction and(DescribedPredicate<? super JavaMethod> 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<JavaMethod>- Specified by:
andin interfaceGivenConjunction<JavaMethod>- Specified by:
andin interfaceGivenMembersConjunction<JavaMethod>- 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) GivenMethodsConjunction or(DescribedPredicate<? super JavaMethod> 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<JavaMethod>- Specified by:
orin interfaceGivenConjunction<JavaMethod>- Specified by:
orin interfaceGivenMembersConjunction<JavaMethod>- 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
-
should
Description copied from interface:GivenMembersConjunctionLikeGivenMembersConjunction.should(ArchCondition)but allows to pick the condition to join by a fluent API.- Specified by:
shouldin interfaceGivenCodeUnitsConjunction<JavaMethod>- Specified by:
shouldin interfaceGivenMembersConjunction<JavaMethod>
-
should
@PublicAPI(usage=ACCESS) MethodsShouldConjunction should(ArchCondition<? super JavaMethod> condition) Description copied from interface:GivenConjunction- Specified by:
shouldin interfaceGivenCodeUnitsConjunction<JavaMethod>- Specified by:
shouldin interfaceGivenConjunction<JavaMethod>- Specified by:
shouldin interfaceGivenMembersConjunction<JavaMethod>- Parameters:
condition- TheArchConditionto check objects against- Returns:
- An
ArchRulethat can be checked against a set ofOBJECTS
-