Class IdMatcher
java.lang.Object
org.microbean.bean.IdMatcher
- All Implemented Interfaces:
BiPredicate<AttributedType,
,Id> Matcher<AttributedType,
Id>
- Author:
- Laird Nelson
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
test
(TypeMirror type, Iterable<? extends TypeMirror> ts) Tests the suppliedIterable
ofTypeMirror
s to see if at least oneTypeMirror
it yields matches the suppliedTypeMirror
and returns the result.final boolean
test
(AttributedType t, Id id) Tests the suppliedId
to see if it matches the suppliedAttributedType
and returns the result.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiPredicate
and, negate, or
-
Constructor Details
-
IdMatcher
Creates a newIdMatcher
.- Parameters:
qm
- aBeanQualifiersMatcher
; must not benull
ibm
- anInterceptorBindingsMatcher
; must not benull
tm
- aBeanTypeMatcher
; must not benull
- Throws:
NullPointerException
- } if any argument isnull
-
-
Method Details
-
test
Tests the suppliedId
to see if it matches the suppliedAttributedType
and returns the result.An
Id
matches anAttributedType
if and only if all of the following aretrue
:- An invocation of the
BeanQualifiersMatcher.test(Collection, Collection)
method on theBeanQualifiersMatcher
supplied at construction time supplied with the suppliedAttributedType
's attributes and the suppliedId
's attributes returnstrue
- An invocation of the
InterceptorBindingsMatcher.test(Collection, Collection)
method on theBeanQualifiersMatcher
supplied at construction time supplied with the suppliedAttributedType
's attributes and the suppliedId
's attributes returnstrue
- An invocation of this
IdMatcher
'stest(TypeMirror, Iterable)
method supplied with the suppliedAttributedType
's type and the suppliedId
's attributes returnstrue
- Specified by:
test
in interfaceBiPredicate<AttributedType,
Id> - Specified by:
test
in interfaceMatcher<AttributedType,
Id> - Parameters:
t
- anAttributedType
; must not benull
id
- anId
; must not benull
- Returns:
true
ifid
matchest
;false
otherwise- Throws:
NullPointerException
- if any argument isnull
- See Also:
- An invocation of the
-
test
Tests the suppliedIterable
ofTypeMirror
s to see if at least oneTypeMirror
it yields matches the suppliedTypeMirror
and returns the result.A
TypeMirror
t from the suppliedIterable
matches the suppliedtype
argument if an invocation of theBeanTypeMatcher.test(TypeMirror, TypeMirror)
method invoked on theBeanTypeManager
supplied at construction time supplied withtype
and t returnstrue
.- Parameters:
type
- aTypeMirror
to test against; must not benull
ts
- anIterable
ofTypeMirror
s; must not benull
- Returns:
true
if at least oneTypeMirror
fromts
matchest
- Throws:
NullPointerException
- if any argument isnull
- See Also:
-