public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor implements java.io.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)
,
Serialized FormHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
Pointcut |
getPointcut()
Get the Pointcut that drives this advisor.
|
void |
setPointcut(Pointcut pointcut)
Specify the pointcut targeting the advice.
|
java.lang.String |
toString() |
getAdvice, setAdvice
equals, getOrder, hashCode, isPerInstance, setOrder
public 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(Pointcut pointcut)
Default is Pointcut.TRUE
.
public Pointcut getPointcut()
PointcutAdvisor
getPointcut
in interface PointcutAdvisor
public java.lang.String toString()
toString
in class AbstractGenericPointcutAdvisor