code: void writeJsFile(TypeElement element, ElementVisitor visitor, String packagePath, String fn) {
  		try (Writer w = fws.getFileObjectWriterInClassOutput(packagePath, fn)) {
  			element.accept(visitor, w);
  		} catch (IOException ioe) {
  			messager.printMessage(Diagnostic.Kind.MANDATORY_WARNING, " FAILED TO CREATE : " + packagePath + "." + fn);
  		}
  	}
docs: generate js service in packagePath.fn in classes directory/packagePath
  
  @param element
  @param visitor
  @param packagePath
  @param fn