< prev index next >

src/jdk.internal.clang/share/classes/jdk/internal/clang/Type.java

Print this page

        

@@ -66,6 +66,24 @@
         // FIXME: assert(v == getData().getInt(0));
         return TypeKind.valueOf(v);
     }
 
     public native Cursor getDeclarationCursor();
+
+    public native boolean equalType(Type other);
+
+    @Override
+    public boolean equals(Object other) {
+        if (this == other) {
+            return true;
+        }
+        if (!(other instanceof Type)) {
+            return false;
+        }
+        return equalType((Type)other);
+    }
+
+    @Override
+    public int hashCode() {
+        return spelling().hashCode();
+    }
 }
< prev index next >