code: void writeJsFileToJsDir(TypeElement element, ElementVisitor visitor, String packagePath, String fn, String dir) {
  		if (null != dir) {
  			try (Writer w = fws.getFileObjectWriter(dir + File.separatorChar + "srvs", packagePath + "." + fn)) {
  				messager.printMessage(Diagnostic.Kind.MANDATORY_WARNING, " javascript generation class : " + element + " to : " + dir);
  				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