for (TypeVariable tv: sig.getTypeParameters()) for (Type t: tv.getBounds()) introspectiondata += "   <arg type=\""+DBusConnection.getDBusType(t)+"\" direction=\"out\" />\n";
   private Map<MethodTuple,Method> getExportedMethods(Class c) throws DBusException   {      if (DBusInterface.class.equals(c)) return new HashMap<MethodTuple,Method>();      Map<MethodTuple,Method> m = new HashMap<MethodTuple,Method>();      for (Class i: c.getInterfaces())         if (DBusInterface.class.equals(i)) {            // add this class's public methods            introspectiondata += " <interface name=\""+c.getName()+"\">\n";            introspectiondata += getAnnotations(c);            for (Method meth: c.getDeclaredMethods())                if (Modifier.isPublic(meth.getModifiers())) {                  m.put(new MethodTuple(c.getName().replaceAll("[$]","."), meth.getName()), meth);                  introspectiondata += "  <method name=\""+meth.getName()+"\" >\n";                  introspectiondata += getAnnotations(meth);                  for (Class ex: meth.getExceptionTypes())                     if (DBusExecutionException.class.isAssignableFrom(ex))                        introspectiondata +=                           "   <annotation type=\"org.freedesktop.DBus.Method.Error\" value=\""+ex.getName().replaceAll("[$]",".")+"\" />\n";                  for (Type pt: meth.getGenericParameterTypes())                     introspectiondata +=                        "   <arg type=\""+DBusConnection.getDBusType(pt)+"\" direction=\"in\"/>\n";                  if (!Void.TYPE.equals(meth.getGenericReturnType())) {                     if (Tuple.class.isAssignableFrom((Class) meth.getReturnType())) {                        for (Type t: ((ParameterizedType) meth.getGenericReturnType()).getActualTypeArguments())                        introspectiondata +=                           "   <arg type=\""+DBusConnection.getDBusType(t)+"\" direction=\"out\"/>\n";                     } else if (Object[].class.equals(meth.getGenericReturnType())) {                        throw new DBusException("Return type of Object[] cannot be introspected properly");                     } else                        introspectiondata +=                        "   <arg type=\""+DBusConnection.getDBusType(meth.getGenericReturnType())+"\" direction=\"out\"/>\n";                  }                  introspectiondata += "  </method>\n";               }            for (Class sig: c.getDeclaredClasses())                if (DBusSignal.class.isAssignableFrom(sig)) {                  introspectiondata += "  <signal name=\""+sig.getSimpleName()+"\">\n";                  introspectiondata += getAnnotations(sig);                  for (TypeVariable tv: sig.getTypeParameters())                     for (Type t: tv.getBounds())                        introspectiondata += "   <arg type=\""+DBusConnection.getDBusType(t)+"\" direction=\"out\" />\n";                  introspectiondata += "  </signal>\n";               }            introspectiondata += " </interface>\n";         } else {            // recurse            m.putAll(getExportedMethods(i));         }      return m;   }