1 16 17 package org.springframework.aop.support; 18 19 import java.io.Serializable ; 20 21 import org.aopalliance.aop.Advice; 22 23 import org.springframework.aop.Pointcut; 24 25 37 public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor implements Serializable { 38 39 private Pointcut pointcut = Pointcut.TRUE; 40 41 42 47 public DefaultPointcutAdvisor() { 48 } 49 50 55 public DefaultPointcutAdvisor(Advice advice) { 56 this(Pointcut.TRUE, advice); 57 } 58 59 64 public DefaultPointcutAdvisor(Pointcut pointcut, Advice advice) { 65 this.pointcut = pointcut; 66 setAdvice(advice); 67 } 68 69 70 75 public void setPointcut(Pointcut pointcut) { 76 this.pointcut = (pointcut != null ? pointcut : Pointcut.TRUE); 77 } 78 79 public Pointcut getPointcut() { 80 return this.pointcut; 81 } 82 83 84 public String toString() { 85 return getClass().getName() + ": pointcut [" + getPointcut() + "]; advice [" + getAdvice() + "]"; 86 } 87 88 } 89 | Popular Tags |