]> source.dussan.org Git - aspectj.git/commitdiff
itd inners
authoraclement <aclement>
Fri, 11 Jun 2010 18:19:22 +0000 (18:19 +0000)
committeraclement <aclement>
Fri, 11 Jun 2010 18:19:22 +0000 (18:19 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/NewMemberClassTypeMunger.java

index e7576e96af524391f8dc4bcca4b0f14bbb758fb5..c086c2c86f67d677a6a361ad119abf42334844a5 100644 (file)
@@ -23,7 +23,7 @@ import org.aspectj.bridge.ISourceLocation;
 public class NewMemberClassTypeMunger extends ResolvedTypeMunger {
 
        private UnresolvedType targetType;
-       private String memberTypeName;
+       private String memberTypeName; // short (last part of) name
        private int version = 1; // 1.6.9m2
 
        public NewMemberClassTypeMunger(UnresolvedType targetType, String memberTypeName) {
@@ -67,4 +67,24 @@ public class NewMemberClassTypeMunger extends ResolvedTypeMunger {
                return memberTypeName;
        }
 
+       public int hashCode() {
+               int result = 17;
+               result = 37 * result + kind.hashCode();
+               result = 37 * result + memberTypeName.hashCode();
+               result = 37 * result + targetType.hashCode();
+               result = 37 * result + ((typeVariableAliases == null) ? 0 : typeVariableAliases.hashCode());
+               return result;
+       }
+
+       public boolean equals(Object other) {
+               if (!(other instanceof NewMemberClassTypeMunger)) {
+                       return false;
+               }
+               NewMemberClassTypeMunger o = (NewMemberClassTypeMunger) other;
+               return ((kind == null) ? (o.kind == null) : kind.equals(o.kind))
+                               && memberTypeName.equals(o.memberTypeName)
+                               && targetType.equals(o.targetType)
+                               && ((typeVariableAliases == null) ? (o.typeVariableAliases == null) : typeVariableAliases
+                                               .equals(o.typeVariableAliases));
+       }
 }
\ No newline at end of file