org.springframework.aop.support
Class DefaultPointcutAdvisor

java.lang.Object
  extended byorg.springframework.aop.support.AbstractPointcutAdvisor
      extended byorg.springframework.aop.support.DefaultPointcutAdvisor
All Implemented Interfaces:
Advisor, Ordered, PointcutAdvisor, Serializable

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.

Author:
Rod Johnson
See Also:
Serialized Form

Constructor Summary
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
 
Method Summary
 Pointcut getPointcut()
          Get the Pointcut that drives this advisor.
 void setPointcut(Pointcut pointcut)
           
 
Methods inherited from class org.springframework.aop.support.AbstractPointcutAdvisor
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

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 true.


DefaultPointcutAdvisor

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

Parameters:
advice - the advice to use

DefaultPointcutAdvisor

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

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

setPointcut

public void setPointcut(Pointcut pointcut)

getPointcut

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

Specified by:
getPointcut in interface PointcutAdvisor


Copyright (C) 2003-2004 The Spring Framework Project.