1 21 package proguard; 22 23 24 30 public class MemberSpecification 31 { 32 public int requiredSetAccessFlags; 33 public int requiredUnsetAccessFlags; 34 public String annotationType; 35 public String name; 36 public String descriptor; 37 38 39 42 public MemberSpecification() 43 { 44 this(0, 45 0, 46 null, 47 null, 48 null); 49 } 50 51 52 71 public MemberSpecification(int requiredSetAccessFlags, 72 int requiredUnsetAccessFlags, 73 String annotationType, 74 String name, 75 String descriptor) 76 { 77 this.requiredSetAccessFlags = requiredSetAccessFlags; 78 this.requiredUnsetAccessFlags = requiredUnsetAccessFlags; 79 this.annotationType = annotationType; 80 this.name = name; 81 this.descriptor = descriptor; 82 } 83 84 85 86 88 public boolean equals(Object object) 89 { 90 if (object == null || 91 this.getClass() != object.getClass()) 92 { 93 return false; 94 } 95 96 MemberSpecification other = (MemberSpecification)object; 97 return 98 (this.requiredSetAccessFlags == other.requiredSetAccessFlags ) && 99 (this.requiredUnsetAccessFlags == other.requiredUnsetAccessFlags ) && 100 (this.annotationType == null ? other.annotationType == null : this.annotationType.equals(other.annotationType)) && 101 (this.name == null ? other.name == null : this.name.equals(other.name) ) && 102 (this.descriptor == null ? other.descriptor == null : this.descriptor.equals(other.descriptor) ); 103 } 104 105 public int hashCode() 106 { 107 return 108 (requiredSetAccessFlags ) ^ 109 (requiredUnsetAccessFlags ) ^ 110 (annotationType == null ? 0 : annotationType.hashCode()) ^ 111 (name == null ? 0 : name.hashCode() ) ^ 112 (descriptor == null ? 0 : descriptor.hashCode() ); 113 } 114 } 115 | Popular Tags |