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



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

Log:
We can just check cls.isInterface first; duh.


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:36:06 2008
@@ -199,14 +199,7 @@
         /* Special-case GObject.GObjectProxy here - these are interface values
          * for which we don't know of a current concrete class.
          */
-        boolean isInterface = false;
-        for (Class<?> iface : cls.getInterfaces()) {
-        	if (iface.equals(GObject.GObjectProxy.class)) {
-        		isInterface = true;
-        		break;
-        	}
-        }
-        if (isInterface) {
+        if (cls.isInterface() && GObject.GObjectProxy.class.isAssignableFrom(cls)) {
     		cls = (Class<T>) getStubClassFor(cls);        	
         }
         /* For GObject, read the g_class field to find



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