code: public ServiceMethod createAndGatherImports (Method method, ImportSet imports)
      {
          ServiceMethod sm = new ServiceMethod(method);
          sm.gatherImports(imports);
          return sm;
      }
docs: Creates a new service method and adds its basic imports to a set.
  @param method the method to create
  @param imports will be filled with the types required by the method