java-gobject-introspection r44 - trunk/src/org/gnome/gir/gobject



Author: walters
Date: Mon Sep  8 23:01:13 2008
New Revision: 44
URL: http://svn.gnome.org/viewvc/java-gobject-introspection?rev=44&view=rev

Log:
Stronger check for interfaces; don't pick up concrete classes


Modified:
   trunk/src/org/gnome/gir/gobject/NativeObject.java

Modified: trunk/src/org/gnome/gir/gobject/NativeObject.java
==============================================================================
--- trunk/src/org/gnome/gir/gobject/NativeObject.java	(original)
+++ trunk/src/org/gnome/gir/gobject/NativeObject.java	Mon Sep  8 23:01:13 2008
@@ -199,8 +199,15 @@
         /* Special-case GObject.GObjectProxy here - these are interface values
          * for which we don't know of a current concrete class.
          */
-        if (GObject.GObjectProxy.class.isAssignableFrom(cls)) {
-        	cls = (Class<T>) getStubClassFor(cls);
+        boolean isInterface = false;
+        for (Class<?> iface : cls.getInterfaces()) {
+        	if (iface.equals(GObject.GObjectProxy.class)) {
+        		isInterface = true;
+        		break;
+        	}
+        }
+        if (isInterface) {
+    		cls = (Class<T>) getStubClassFor(cls);        	
         }
         /* For GObject, read the g_class field to find
          * the most exact class match



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]