< prev index next >

test/jdk/com/sun/tools/jextract/jclang-ffi/src/jdk/internal/clang/Type.java

Print this page

        

@@ -99,6 +99,22 @@
     }
 
     public Cursor getDeclarationCursor() {
         return new Cursor(LibClang.lib.clang_getTypeDeclaration(type));
     }
+
+    @Override
+    public boolean equals(Object other) {
+        if (this == other) {
+            return true;
+        }
+        if (!(other instanceof Type)) {
+            return false;
+        }
+        return LibClang.lib.clang_equalTypes(type, ((Type)other).type) != 0;
+    }
+
+    @Override
+    public int hashCode() {
+        return spelling().hashCode();
+    }
 }
< prev index next >