The Pointcut
class exposes two methods for the union and intersection of pointcuts.
public static Pointcut union (Pointcut a, Pointcut b) public static Pointcut intersection (Pointcut a, Pointcut b)
The union of two pointcuts is the pointcut matching any method matched by either pointcut (Boolean OR). The intersection matches only methods matched by both pointcuts (Boolean AND).
Pointcuts can be composed using the static methods in the org.springframework.aop.support.Pointcuts
(union and intersection) class, or using the ComposablePointcut
class in the same package.
The ComposablePointcut
class is used to compose two or more pointcuts together with operations such as union()
and intersection()
.
The full qualified name of the class is:
org.springframework.aop.support.ComposablePointcut
By default, ComposablePointcut
is created with a ClassFilter
that matches all the classes and a MethodMatcher
that matches all the methods.
We can supply our own initial...