类 DefaultPointcutAdvisor
- java.lang.Object
- org.springframework.aop.support.AbstractPointcutAdvisor
- org.springframework.aop.support.AbstractGenericPointcutAdvisor
- org.springframework.aop.support.DefaultPointcutAdvisor
- 所有已实现的接口:
Serializable
,Advisor
,PointcutAdvisor
,Ordered
public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor implements Serializable
Convenient Pointcut-driven Advisor implementation.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.
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
setPointcut(org.springframework.aop.Pointcut)
,AbstractGenericPointcutAdvisor.setAdvice(org.aopalliance.aop.Advice)
, 序列化表格
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 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()
从类继承的方法 org.springframework.aop.support.AbstractGenericPointcutAdvisor
getAdvice, setAdvice
从类继承的方法 org.springframework.aop.support.AbstractPointcutAdvisor
equals, getOrder, hashCode, isPerInstance, setOrder
构造器详细资料
DefaultPointcutAdvisor
public DefaultPointcutAdvisor()
Create an empty DefaultPointcutAdvisor.Advice must be set before use using setter methods. Pointcut will normally be set also, but defaults to
Pointcut.TRUE
.
DefaultPointcutAdvisor
public DefaultPointcutAdvisor(Advice advice)
Create a DefaultPointcutAdvisor that matches all methods.Pointcut.TRUE
will be used as Pointcut.- 参数:
advice
- the Advice to use
DefaultPointcutAdvisor
public DefaultPointcutAdvisor(Pointcut pointcut, Advice advice)
Create a DefaultPointcutAdvisor, specifying Pointcut and Advice.- 参数:
pointcut
- the Pointcut targeting the Adviceadvice
- the Advice to run when Pointcut matches
方法详细资料
setPointcut
public void setPointcut(Pointcut pointcut)
Specify the pointcut targeting the advice.Default is
Pointcut.TRUE
.
getPointcut
public Pointcut getPointcut()
从接口复制的说明:PointcutAdvisor
Get the Pointcut that drives this advisor.- 指定者:
getPointcut
在接口中PointcutAdvisor