java-gobject-introspection r135 - trunk/src/org/gnome/gir/compiler



Author: walters
Date: Fri Nov 28 00:48:25 2008
New Revision: 135
URL: http://svn.gnome.org/viewvc/java-gobject-introspection?rev=135&view=rev

Log:
Write out interface prerequisites

Modified:
   trunk/src/org/gnome/gir/compiler/CodeFactory.java

Modified: trunk/src/org/gnome/gir/compiler/CodeFactory.java
==============================================================================
--- trunk/src/org/gnome/gir/compiler/CodeFactory.java	(original)
+++ trunk/src/org/gnome/gir/compiler/CodeFactory.java	Fri Nov 28 00:48:25 2008
@@ -903,8 +903,18 @@
 		
 		String internalName = getInternalName(info);
 		
+		List<String> extendsList = new ArrayList<String>();
+		extendsList.add("org/gnome/gir/gobject/GObject$GObjectProxy");
+		
+		for (BaseInfo prereq : info.getPrerequisites()) {
+			if (!(prereq instanceof InterfaceInfo))
+				continue;
+			InterfaceInfo prereqIface = (InterfaceInfo) prereq;
+			Type prereqType = TypeMap.typeFromInfo(prereqIface);
+			extendsList.add(prereqType.getInternalName());
+		}
 		compilation.writer.visit(V1_6, ACC_PUBLIC + ACC_ABSTRACT + ACC_INTERFACE, internalName, null, "java/lang/Object", 
-				new String[] { "org/gnome/gir/gobject/GObject$GObjectProxy" });
+				extendsList.toArray(new String[]{}));
 		globals.interfaceTypes.put(internalName, info.getTypeInit());
 		
 		Type ifaceType = TypeMap.typeFromInfo(info);



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