if (! remEx && !force) throw new CompilationError(m[i].getName() + ", defined in " + c.getName() + ", does not throw " + RemoteException.class.getName()); }
} if (! remEx && !force) throw new CompilationError(m[i].getName() + ", defined in " + c.getName() + ", does not throw " + RemoteException.class.getName());
  public synchronized void compile(Class remote)  {    reset();    String s;    // Get the package.    s = remote.getName();    int p = s.lastIndexOf('.');    if (p < 0)      {        // Root package.        packag = "";        implName = name = s;      }    else      {        packag = s.substring(0, p);        implName = name = s.substring(p + 1);      }         name = convertStubName(name);    stubName = name;    vars.put("#name", name);    vars.put("#package", packag);    vars.put("#implName", implName);    if (verbose)      System.out.println("Package " + packag + ", name " + name + " impl "                         + implName);    // Get the implemented remotes.    Class[] interfaces = remote.getInterfaces();    for (int i = 0; i < interfaces.length; i++)      {        if (Remote.class.isAssignableFrom(interfaces[i]))          {            if (! interfaces[i].equals(Remote.class))              {                implementedRemotes.add(interfaces[i]);              }          }      }    vars.put("#idList", getIdList(implementedRemotes));    // Collect and process methods.    Iterator iter = implementedRemotes.iterator();    while (iter.hasNext())      {        Class c = (Class) iter.next();        Method[] m = c.getMethods();        // Check if throws RemoteException.        for (int i = 0; i < m.length; i++)          {            Class[] exc = m[i].getExceptionTypes();            boolean remEx = false;            for (int j = 0; j < exc.length; j++)              {                if (RemoteException.class.isAssignableFrom(exc[j]))                  {                    remEx = true;                    break;                  }                if (! remEx && !force)                  throw new CompilationError(m[i].getName() + ", defined in "                                             + c.getName()                                             + ", does not throw "                                             + RemoteException.class.getName());              }            AbstractMethodGenerator mm = createMethodGenerator(m[i]);            methods.add(mm);          }      }  }