Type[] types = typeCache.get(c); Constructor con = conCache.get(c); if (null == types) { con = c.getDeclaredConstructors()[0]; conCache.put(c, con); Type[] ts = con.getGenericParameterTypes(); types = new Type[ts.length-1]; for (int i = 1; i < ts.length; i++) if (ts[i] instanceof TypeVariable) for (Type b: ((TypeVariable) ts[i]).getBounds()) types[i-1] = b; else types[i-1] = ts[i]; typeCache.put(c, types); }  try { parameters = DBusConnection.deSerializeParameters(parameters, types); DBusSignal s; if (null == parameters) s = (DBusSignal) con.newInstance(objectpath); else { Object[] args = new Object[parameters.length + 1]; args[0] = objectpath; System.arraycopy(parameters, 0, args, 1, parameters.length);  s = (DBusSignal) con.newInstance(args); } s.setSerial(serial); s.setSource(source); return s; } catch (Exception e) { if (DBusConnection.EXCEPTION_DEBUG) e.printStackTrace(); throw new DBusException(e.getMessage()); }
DBusSignal s = new internalsig(source, objectpath, c.getEnclosingClass().getName(), c.getSimpleName(), sig, parameters, serial); s.c = c; return s;
   static DBusSignal createSignal(Class<? extends DBusSignal> c, String source, String objectpath, String sig, long serial, Object... parameters) throws DBusException   {      Type[] types = typeCache.get(c);      Constructor con = conCache.get(c);      if (null == types) {         con = c.getDeclaredConstructors()[0];         conCache.put(c, con);         Type[] ts = con.getGenericParameterTypes();         types = new Type[ts.length-1];         for (int i = 1; i < ts.length; i++)            if (ts[i] instanceof TypeVariable)               for (Type b: ((TypeVariable) ts[i]).getBounds())                  types[i-1] = b;            else               types[i-1] = ts[i];         typeCache.put(c, types);      }      try {         parameters = DBusConnection.deSerializeParameters(parameters, types);         DBusSignal s;         if (null == parameters) s = (DBusSignal) con.newInstance(objectpath);         else {            Object[] args = new Object[parameters.length + 1];            args[0] = objectpath;            System.arraycopy(parameters, 0, args, 1, parameters.length);            s = (DBusSignal) con.newInstance(args);         }         s.setSerial(serial);         s.setSource(source);         return s;      } catch (Exception e) {          if (DBusConnection.EXCEPTION_DEBUG) e.printStackTrace();         throw new DBusException(e.getMessage());      }   }