1 22 package org.jboss.aop.advice; 23 24 25 30 public class PrecedenceDefEntry 31 { 32 String interceptorClass; 33 String adviceMethod; 34 35 public PrecedenceDefEntry(String interceptorClass, 36 String adviceMethod) 37 { 38 this.interceptorClass = interceptorClass; 39 this.adviceMethod = adviceMethod; 40 } 41 42 public String getAdviceMethod() 43 { 44 return adviceMethod; 45 } 46 47 public String getInterceptorClass() 48 { 49 return interceptorClass; 50 } 51 52 53 public boolean equals(Object o) 54 { 55 if (o instanceof PrecedenceDefEntry) 56 { 57 PrecedenceDefEntry pde = (PrecedenceDefEntry)o; 58 59 if (this.interceptorClass.equals(pde.interceptorClass)) 60 { 61 if (this.adviceMethod == null) 62 { 63 return pde.adviceMethod == null; 64 } 65 else if (pde.adviceMethod != null) 66 { 67 return this.adviceMethod.equals(pde.adviceMethod); 68 } 69 } 70 } 71 72 return false; 73 } 74 75 76 public String toString() 77 { 78 return "Entry: interceptorClass=" + interceptorClass + "; adviceMethod=" + adviceMethod; 79 } 80 81 } 82 | Popular Tags |