/** * Match all methods that <i>either</i> (or both) of the given MethodMatchers matches. * @param mm1 the first MethodMatcher * @param cf1 the corresponding ClassFilter for the first MethodMatcher * @param mm2 the second MethodMatcher * @param cf2 the corresponding ClassFilter for the second MethodMatcher * @return a distinct MethodMatcher that matches all methods that either * of the given MethodMatchers matches */ static MethodMatcher union(MethodMatcher mm1, ClassFilter cf1, MethodMatcher mm2, ClassFilter cf2) { return (mm1 instanceof IntroductionAwareMethodMatcher || mm2 instanceof IntroductionAwareMethodMatcher ? new ClassFilterAwareUnionIntroductionAwareMethodMatcher(mm1, cf1, mm2, cf2) : new ClassFilterAwareUnionMethodMatcher(mm1, cf1, mm2, cf2)); }
/** * Match all methods that <i>either</i> (or both) of the given MethodMatchers matches. * @param mm1 the first MethodMatcher * @param cf1 the corresponding ClassFilter for the first MethodMatcher * @param mm2 the second MethodMatcher * @param cf2 the corresponding ClassFilter for the second MethodMatcher * @return a distinct MethodMatcher that matches all methods that either * of the given MethodMatchers matches */ static MethodMatcher union(MethodMatcher mm1, ClassFilter cf1, MethodMatcher mm2, ClassFilter cf2) { return new ClassFilterAwareUnionMethodMatcher(mm1, cf1, mm2, cf2); }
/** * Match all methods that <i>either</i> (or both) of the given MethodMatchers matches. * @param mm1 the first MethodMatcher * @param cf1 the corresponding ClassFilter for the first MethodMatcher * @param mm2 the second MethodMatcher * @param cf2 the corresponding ClassFilter for the second MethodMatcher * @return a distinct MethodMatcher that matches all methods that either * of the given MethodMatchers matches */ static MethodMatcher union(MethodMatcher mm1, ClassFilter cf1, MethodMatcher mm2, ClassFilter cf2) { return (mm1 instanceof IntroductionAwareMethodMatcher || mm2 instanceof IntroductionAwareMethodMatcher ? new ClassFilterAwareUnionIntroductionAwareMethodMatcher(mm1, cf1, mm2, cf2) : new ClassFilterAwareUnionMethodMatcher(mm1, cf1, mm2, cf2)); }