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 booleantest(TypeMirror type, Iterable<? extends TypeMirror> ts) Tests the suppliedIterableofTypeMirrors to see if at least oneTypeMirrorit yields matches the suppliedTypeMirrorand returns the result.final booleantest(AttributedType t, Id id) Tests the suppliedIdto see if it matches the suppliedAttributedTypeand returns the result.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiPredicate
and, negate, or
-
Constructor Details
-
IdMatcher
Creates a newIdMatcher.- Parameters:
qm- aBeanQualifiersMatcher; must not benullibm- anInterceptorBindingsMatcher; must not benulltm- aBeanTypeMatcher; must not benull- Throws:
NullPointerException- } if any argument isnull
-
-
Method Details
-
test
Tests the suppliedIdto see if it matches the suppliedAttributedTypeand returns the result.An
Idmatches anAttributedTypeif and only if all of the following aretrue:- An invocation of the
BeanQualifiersMatcher.test(Collection, Collection)method on theBeanQualifiersMatchersupplied 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 theBeanQualifiersMatchersupplied 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:
testin interfaceBiPredicate<AttributedType,Id> - Specified by:
testin interfaceMatcher<AttributedType,Id> - Parameters:
t- anAttributedType; must not benullid- anId; must not benull- Returns:
trueifidmatchest;falseotherwise- Throws:
NullPointerException- if any argument isnull- See Also:
- An invocation of the
-
test
Tests the suppliedIterableofTypeMirrors to see if at least oneTypeMirrorit yields matches the suppliedTypeMirrorand returns the result.A
TypeMirrort from the suppliedIterablematches the suppliedtypeargument if an invocation of theBeanTypeMatcher.test(TypeMirror, TypeMirror)method invoked on theBeanTypeManagersupplied at construction time supplied withtypeand t returnstrue.- Parameters:
type- aTypeMirrorto test against; must not benullts- anIterableofTypeMirrors; must not benull- Returns:
trueif at least oneTypeMirrorfromtsmatchest- Throws:
NullPointerException- if any argument isnull- See Also:
-