Class DefaultPointcutAdvisor

  extended by
      extended by
All Implemented Interfaces:
Serializable, Advisor, PointcutAdvisor, Ordered

public class DefaultPointcutAdvisor
extends AbstractPointcutAdvisor
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
See Also:
Serialized Form

Constructor Summary
          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
Method Summary
 Pointcut getPointcut()
          Get the Pointcut that drives this advisor.
 void setPointcut(Pointcut pointcut)
Methods inherited from class
equals, getAdvice, getOrder, hashCode, isPerInstance, setAdvice, setOrder, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail


public DefaultPointcutAdvisor()
Create an empty DefaultPointcutAdvisor. Advice must be set before use using setter methods. Pointcut will normally be set also, but defaults to true.


public DefaultPointcutAdvisor(Advice advice)
Create a DefaultPointcutAdvisor that matches all methods. Pointcut.TRUE will be used as pointcut.

advice - the advice to use


public DefaultPointcutAdvisor(Pointcut pointcut,
                              Advice advice)
Create a DefaultPointcutAdvisor, specifying pointcut and advice

pointcut - pointcut targeting the advice
advice - advice to run when pointcut matches
Method Detail


public void setPointcut(Pointcut pointcut)


public Pointcut getPointcut()
Description copied from interface: PointcutAdvisor
Get the Pointcut that drives this advisor.

Specified by:
getPointcut in interface PointcutAdvisor

Copyright (c) 2002-2007 The Spring Framework Project.