for (String ex: exceptions) createException(ex, name.replaceAll("\\.[^.]*$",""), factory.createPrintStream(path, ex));
for (String fqn: exceptions) { String name = fqn.replaceAll("^.*\\.([^.]*)$", "$1"); String pack = fqn.replaceAll("\\.[^.]*$",""); String path = pack.replaceAll("\\.", "/"); String file = name.replaceAll("\\.","/")+".java"; factory.init(file, path); createException(name, pack, factory.createPrintStream(path, name)); }
   private void createExceptions(Set<String> exceptions, String name, String path) throws DBusException, IOException   {      for (String ex: exceptions)          createException(ex, name.replaceAll("\\.[^.]*$",""),               factory.createPrintStream(path, ex));   }