Package org.springframework.aop.support
Class Pointcuts
- java.lang.Object
- org.springframework.aop.support.Pointcuts
public abstract class Pointcuts extends Object
Pointcut constants for matching getters and setters, and static methods useful for manipulating and evaluating pointcuts.These methods are particularly useful for composing pointcuts using the union and intersection methods.
- Author:
- Rod Johnson, Juergen Hoeller
Constructor Summary
Constructors Constructor Description Pointcuts()
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Pointcut
intersection(Pointcut pc1, Pointcut pc2)
Match all methods that both the given pointcuts match.static boolean
matches(Pointcut pointcut, Method method, Class<?> targetClass, Object... args)
Perform the least expensive check for a pointcut match.static Pointcut
union(Pointcut pc1, Pointcut pc2)
Match all methods that either (or both) of the given pointcuts matches.
Constructor Detail
Pointcuts
public Pointcuts()
Method Detail
union
public static Pointcut union(Pointcut pc1, Pointcut pc2)
Match all methods that either (or both) of the given pointcuts matches.- Parameters:
pc1
- the first Pointcutpc2
- the second Pointcut- Returns:
- a distinct Pointcut that matches all methods that either of the given Pointcuts matches
intersection
public static Pointcut intersection(Pointcut pc1, Pointcut pc2)
Match all methods that both the given pointcuts match.- Parameters:
pc1
- the first Pointcutpc2
- the second Pointcut- Returns:
- a distinct Pointcut that matches all methods that both of the given Pointcuts match
matches
public static boolean matches(Pointcut pointcut, Method method, Class<?> targetClass, Object... args)
Perform the least expensive check for a pointcut match.- Parameters:
pointcut
- the pointcut to matchmethod
- the candidate methodtargetClass
- the target classargs
- arguments to the method- Returns:
- whether there's a runtime match