1 8 9 package com.sleepycat.persist.model; 10 11 import java.io.Serializable ; 12 13 22 public class FieldMetadata implements Serializable { 23 24 private static final long serialVersionUID = -9037650229184174279L; 25 26 private String name; 27 private String className; 28 private String declaringClassName; 29 30 33 public FieldMetadata(String name, 34 String className, 35 String declaringClassName) { 36 this.name = name; 37 this.className = className; 38 this.declaringClassName = declaringClassName; 39 } 40 41 44 public String getName() { 45 return name; 46 } 47 48 51 public String getClassName() { 52 return className; 53 } 54 55 58 public String getDeclaringClassName() { 59 return declaringClassName; 60 } 61 62 @Override 63 public boolean equals(Object other) { 64 if (other instanceof FieldMetadata) { 65 FieldMetadata o = (FieldMetadata) other; 66 return ClassMetadata.nullOrEqual(name, o.name) && 67 ClassMetadata.nullOrEqual(className, o.className) && 68 ClassMetadata.nullOrEqual(declaringClassName, 69 o.declaringClassName); 70 } else { 71 return false; 72 } 73 } 74 75 @Override 76 public int hashCode() { 77 return ClassMetadata.hashCode(name) + 78 ClassMetadata.hashCode(className) + 79 ClassMetadata.hashCode(declaringClassName); 80 } 81 } 82 | Popular Tags |