Ejemplo n.º 1
0
 public static Set<Type> allUsedSimpleTypes(ThingMLModel model) {
   Set<Type> result = new HashSet<Type>();
   for (Type t : allSimpleTypes(model)) {
     for (Thing thing : allThings(model)) {
       for (Property p : ThingHelper.allPropertiesInDepth(thing)) {
         if (EcoreUtil.equals(p.getType(), t)) result.add(t);
       }
       for (Message m : ThingMLHelpers.allMessages(thing)) {
         for (Parameter p : m.getParameters()) {
           if (EcoreUtil.equals(p.getType(), t)) {
             result.add(t);
           }
         }
       }
     }
   }
   return result;
 }
Ejemplo n.º 2
0
 @SuppressWarnings("unchecked")
 private synchronized void checkReply()
 {
    if (mc.hasReply()) {
       Message m = mc.getReply();
       if (m instanceof Error)
          error = ((Error) m).getException();
       else if (m instanceof MethodReturn) {
          try {
             rval = (ReturnType) RemoteInvocationHandler.convertRV(m.getSig(), m.getParameters(), me, conn);
          } catch (DBusExecutionException DBEe) {
             error = DBEe;
          } catch (DBusException DBe) {
             if (AbstractConnection.EXCEPTION_DEBUG && Debug.debug) Debug.print(Debug.ERR, DBe);
             error = new DBusExecutionException(DBe.getMessage());
          }
       }
    }
 }