Top Description Fields Constructors Methods
org.springframework.aop.support

public Class DefaultPointcutAdvisor

extends AbstractGenericPointcutAdvisor
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor
Annotations
@SuppressWarnings:serial
Imports
java.io.Serializable, org.aopalliance.aop.Advice, org.springframework.aop.Pointcut, org.springframework.lang.Nullable

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.

Authors
Rod Johnson, Juergen Hoeller
See Also
setPointcut, setAdvice

Field Summary

Modifier and TypeField and Description
private Pointcut

Constructor Summary

AccessConstructor and Description
public
DefaultPointcutAdvisor()

Create an empty DefaultPointcutAdvisor.

public
DefaultPointcutAdvisor(Advice
the Advice to use
advice
)

Create a DefaultPointcutAdvisor that matches all methods.

public
DefaultPointcutAdvisor(Pointcut
the Pointcut targeting the Advice
pointcut
,
Advice
the Advice to run when Pointcut matches
advice
)

Create a DefaultPointcutAdvisor, specifying Pointcut and Advice.

Method Summary

Modifier and TypeMethod and Description
public Pointcut
getPointcut()

Implements org.springframework.aop.PointcutAdvisor.getPointcut.

Get the Pointcut that drives this advisor.

public void
setPointcut(Pointcut pointcut)

Specify the pointcut targeting the advice.

public String
toString()

Overrides org.springframework.aop.support.AbstractGenericPointcutAdvisor.toString.

Returns a string representation of the object.

Inherited from org.springframework.aop.support.AbstractGenericPointcutAdvisor:
getAdvicesetAdvice

Field Detail

pointcutback to summary
private Pointcut pointcut

Constructor Detail

DefaultPointcutAdvisorback to summary
public DefaultPointcutAdvisor()

Create an empty DefaultPointcutAdvisor.

Advice must be set before using setter methods. Pointcut will normally be set also, but defaults to Pointcut.TRUE.

DefaultPointcutAdvisorback to summary
public DefaultPointcutAdvisor(Advice advice)

Create a DefaultPointcutAdvisor that matches all methods.

Pointcut.TRUE will be used as Pointcut.

Parameters
advice:Advice

the Advice to use

DefaultPointcutAdvisorback to summary
public DefaultPointcutAdvisor(Pointcut pointcut, Advice advice)

Create a DefaultPointcutAdvisor, specifying Pointcut and Advice.

Parameters
pointcut:Pointcut

the Pointcut targeting the Advice

advice:Advice

the Advice to run when Pointcut matches

Method Detail

getPointcutback to summary
public Pointcut getPointcut()

Implements org.springframework.aop.PointcutAdvisor.getPointcut.

Doc from org.springframework.aop.PointcutAdvisor.getPointcut.

Get the Pointcut that drives this advisor.

Annotations
@Override
setPointcutback to summary
public void setPointcut(Pointcut pointcut)

Specify the pointcut targeting the advice.

Default is Pointcut.TRUE.

See Also
setAdvice
toStringback to summary
public String toString()

Overrides org.springframework.aop.support.AbstractGenericPointcutAdvisor.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override