public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor implements Serializable
This is the most commonly used Advisor implementation. It can be used with any pointcut and advice type, except for introductions. There is normally no need to subclass this class, or to implement custom Advisors.
setPointcut(org.springframework.aop.Pointcut),
AbstractGenericPointcutAdvisor.setAdvice(org.aopalliance.aop.Advice),
序列化表格EMPTY_ADVICE| 构造器和说明 |
|---|
DefaultPointcutAdvisor()
Create an empty DefaultPointcutAdvisor.
|
DefaultPointcutAdvisor(Advice advice)
Create a DefaultPointcutAdvisor that matches all methods.
|
DefaultPointcutAdvisor(Pointcut pointcut,
Advice advice)
Create a DefaultPointcutAdvisor, specifying Pointcut and Advice.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Pointcut |
getPointcut()
Get the Pointcut that drives this advisor.
|
void |
setPointcut(Pointcut pointcut)
Specify the pointcut targeting the advice.
|
String |
toString() |
getAdvice, setAdviceequals, getOrder, hashCode, isPerInstance, setOrderpublic DefaultPointcutAdvisor()
Advice must be set before use using setter methods.
Pointcut will normally be set also, but defaults to Pointcut.TRUE.
public DefaultPointcutAdvisor(Advice advice)
Pointcut.TRUE will be used as Pointcut.
advice - the Advice to usepublic void setPointcut(@Nullable
Pointcut pointcut)
Default is Pointcut.TRUE.
public Pointcut getPointcut()
PointcutAdvisorgetPointcut 在接口中 PointcutAdvisorpublic String toString()