private boolean equalsAdviceClasses(Advisor a, Advisor b) { Advice aa = a.getAdvice(); Advice ba = b.getAdvice(); if (aa == null || ba == null) { return (aa == ba); } return (aa.getClass() == ba.getClass()); }
@Override public int hashCode() { int hashCode = 0; Advisor[] advisors = this.advised.getAdvisors(); for (Advisor advisor : advisors) { Advice advice = advisor.getAdvice(); if (advice != null) { hashCode = 13 * hashCode + advice.getClass().hashCode(); } } hashCode = 13 * hashCode + (this.advised.isFrozen() ? 1 : 0); hashCode = 13 * hashCode + (this.advised.isExposeProxy() ? 1 : 0); hashCode = 13 * hashCode + (this.advised.isOptimize() ? 1 : 0); hashCode = 13 * hashCode + (this.advised.isOpaque() ? 1 : 0); return hashCode; }