Interface MethodLookup
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy interface providing
predicates
to resolve a method called on a composite to its
implementation method.
Predicates
are ordered by filtering priority and applied individually. If a predicate does
not yield any positive match, the next predicate is applied.
- Since:
- 2.0
- Author:
- Mark Paluch
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
Value object representing an invokedMethod
.static interface
A method predicate to be applied on theMethodLookup.InvokedMethod
andmethod candidate
. -
Method Summary
Modifier and TypeMethodDescriptiondefault MethodLookup
and
(MethodLookup other) Returns a composedMethodLookup
that represents a concatenation of this predicate and another.Return an orderedList
ofMethodLookup.MethodPredicate
.
-
Method Details
-
getLookups
List<MethodLookup.MethodPredicate> getLookups()Return an orderedList
ofMethodLookup.MethodPredicate
. Each predicate is applied individually. If anyMethodLookup.MethodPredicate
matches, the tested candidateMethod
passes the filter.- Returns:
List
ofMethodLookup.MethodPredicate
.
-
and
Returns a composedMethodLookup
that represents a concatenation of this predicate and another. When evaluating the composed method lookup, if this lookup evaluatestrue
, then theother
method lookup is not evaluated.- Parameters:
other
- must not be null.- Returns:
- the composed
MethodLookup
.
-