1 16 17 package org.springframework.aop.support; 18 19 import java.io.Serializable ; 20 21 import org.springframework.aop.PointcutAdvisor; 22 import org.springframework.core.Ordered; 23 import org.springframework.util.ObjectUtils; 24 25 35 public abstract class AbstractPointcutAdvisor implements PointcutAdvisor, Ordered, Serializable { 36 37 private int order = Ordered.LOWEST_PRECEDENCE; 38 39 40 public void setOrder(int order) { 41 this.order = order; 42 } 43 44 public int getOrder() { 45 return this.order; 46 } 47 48 public boolean isPerInstance() { 49 return true; 50 } 51 52 53 public boolean equals(Object other) { 54 if (this == other) { 55 return true; 56 } 57 if (!(other instanceof PointcutAdvisor)) { 58 return false; 59 } 60 PointcutAdvisor otherAdvisor = (PointcutAdvisor) other; 61 return (ObjectUtils.nullSafeEquals(getAdvice(), otherAdvisor.getAdvice()) && 62 ObjectUtils.nullSafeEquals(getPointcut(), otherAdvisor.getPointcut())); 63 } 64 65 public int hashCode() { 66 return PointcutAdvisor.class.hashCode(); 67 } 68 69 } 70 | Popular Tags |