1 25 package org.objectweb.easybeans.tests.common.interceptors.invocationcontext; 26 27 import java.io.Serializable ; 28 29 34 public class BeanDescriptor implements Serializable { 35 36 39 private static final long serialVersionUID = -1807144244407143163L; 40 41 44 private int intHashCode; 45 46 49 private String mtIntercepted; 50 51 54 public BeanDescriptor() { 55 setHashCode(0); 56 setInterceptedMethod(""); 57 } 58 59 64 public BeanDescriptor(final int hashCode, final String methodSignature) { 65 setHashCode(hashCode); 66 setInterceptedMethod(methodSignature); 67 } 68 69 73 public int getHashCode() { 74 return intHashCode; 75 } 76 77 81 public void setHashCode(final int hashCode) { 82 this.intHashCode = hashCode; 83 } 84 85 89 public String getInterceptedMethod() { 90 return mtIntercepted; 91 } 92 93 97 public void setInterceptedMethod(final String m) { 98 this.mtIntercepted = m; 99 100 } 101 102 108 public boolean equalsWithException(final Object obj) throws Exception { 109 boolean bResult = false; 110 111 BeanDescriptor refExt = (BeanDescriptor) obj; 112 113 if (refExt.getHashCode() == intHashCode){ 114 bResult = true; 115 }else{ 116 throw new Exception ("The bean hashcodes aren't equal."); 117 } 118 119 return bResult; 120 } 121 } 122 | Popular Tags |