/** * Apply a union with the given ClassFilter. * @param other the ClassFilter to apply a union with * @return this composable pointcut (for call chaining) */ public ComposablePointcut union(ClassFilter other) { this.classFilter = ClassFilters.union(this.classFilter, other); return this; }
/** * Apply a union with the given Pointcut. * <p>Note that for a Pointcut union, methods will only match if their * original ClassFilter (from the originating Pointcut) matches as well. * MethodMatchers and ClassFilters from different Pointcuts will never * get interleaved with each other. * @param other the Pointcut to apply a union with * @return this composable pointcut (for call chaining) */ public ComposablePointcut union(Pointcut other) { this.methodMatcher = MethodMatchers.union( this.methodMatcher, this.classFilter, other.getMethodMatcher(), other.getClassFilter()); this.classFilter = ClassFilters.union(this.classFilter, other.getClassFilter()); return this; }
@Test public void testUnion() { assertTrue(exceptionFilter.matches(RuntimeException.class)); assertFalse(exceptionFilter.matches(TestBean.class)); assertFalse(itbFilter.matches(Exception.class)); assertTrue(itbFilter.matches(TestBean.class)); ClassFilter union = ClassFilters.union(exceptionFilter, itbFilter); assertTrue(union.matches(RuntimeException.class)); assertTrue(union.matches(TestBean.class)); }
public ComposablePointcut union(ClassFilter filter) { this.classFilter = ClassFilters.union(this.classFilter, filter); return this; }
/** * Apply a union with the given ClassFilter. * @param other the ClassFilter to apply a union with * @return this composable pointcut (for call chaining) */ public ComposablePointcut union(ClassFilter other) { this.classFilter = ClassFilters.union(this.classFilter, other); return this; }
/** * Apply a union with the given ClassFilter. * @param other the ClassFilter to apply a union with * @return this composable pointcut (for call chaining) */ public ComposablePointcut union(ClassFilter other) { this.classFilter = ClassFilters.union(this.classFilter, other); return this; }
public ClassFilter getClassFilter() { return ClassFilters.union(a.getClassFilter(), b.getClassFilter()); }
/** * Apply a union with the given Pointcut. * <p>Note that for a Pointcut union, methods will only match if their * original ClassFilter (from the originating Pointcut) matches as well. * MethodMatchers and ClassFilters from different Pointcuts will never * get interleaved with each other. * @param other the Pointcut to apply a union with * @return this composable pointcut (for call chaining) */ public ComposablePointcut union(Pointcut other) { this.methodMatcher = MethodMatchers.union( this.methodMatcher, this.classFilter, other.getMethodMatcher(), other.getClassFilter()); this.classFilter = ClassFilters.union(this.classFilter, other.getClassFilter()); return this; }
/** * Apply a union with the given Pointcut. * <p>Note that for a Pointcut union, methods will only match if their * original ClassFilter (from the originating Pointcut) matches as well. * MethodMatchers and ClassFilters from different Pointcuts will never * get interleaved with each other. * @param other the Pointcut to apply a union with * @return this composable pointcut (for call chaining) */ public ComposablePointcut union(Pointcut other) { this.methodMatcher = MethodMatchers.union( this.methodMatcher, this.classFilter, other.getMethodMatcher(), other.getClassFilter()); this.classFilter = ClassFilters.union(this.classFilter, other.getClassFilter()); return this; }