LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, name) + "Generator";

        List<SupportingFile> supportingFiles =
                ImmutableList
                       .of(new SupportingFile("pom.mustache", "", "pom.xml"),
                                new SupportingFile("generatorClass.mustache", on(File.separator)
                                       .join("src/main/java", asPath(targetPackage)), mainClass
                                       .concat(".java")), new SupportingFile("README.mustache",
                                        "", "README.md"), new SupportingFile("api.template",
                                        "src/main/resources" + File.separator + name,
                                        "api.mustache"), new SupportingFile("model.template",
                                        "src/main/resources" + File.separator + name,
                                        "model.mustache"), new SupportingFile("services.mustache",
                                        "src/main/resources/META-INF/services",
                                        "io.swagger.codegen.CodegenConfig"));

        String swaggerVersion = Version.readVersionFromResources();

        Map<String, Object> data =
                new ImmutableMap.Builder<String, Object>().put("generatorPackage", targetPackage)
                       .put("generatorClass", mainClass).put("name", name)
                       .put("fullyQualifiedGeneratorClass", targetPackage + "." + mainClass)
                       .put("swaggerCodegenVersion", swaggerVersion).build();


        with(supportingFiles).convert(processFiles(targetDir, data));
    }

    /**
     * Converter method to process supporting files: execute with mustache, or simply copy to
     * destination directory
     *
     * @param targetDir - destination directory
     * @param data - map with additional params needed to process templates
     * @return converter object to pass to lambdaj
     */
    private static Converter<SupportingFile, File> processFiles(final File targetDir,
            final Map<String, Object> data) {
        return new Converter<SupportingFile, File>() {
            private DefaultGenerator generator = new DefaultGenerator();

            @Override
            public File convert(SupportingFile support) {
                try {
                    File destination
LOWER_HYPHEN.to(CaseFormat. UPPER_CAMEL, name) + " Generator "; 

         List < SupportingFile > supportingFiles = 
                 ImmutableList 
                        .of(new SupportingFile("pom.mustache ", " ", " pom.xml "), 
                                 new SupportingFile("generatorClass.mustache ", on(File.separator) 
                                        .join("src / main / java ", asPath(targetPackage) ), mainClass 
                                        .concat(".java ") ), new SupportingFile("README.mustache ", 
                                         " ", " README.md "), new SupportingFile("api.template ", 
                                         " src / chief / resource " + File.separator + name, 
                                         " api.mustache "), new SupportingFile("model.template ", 
                                         " src / main / resources " + File.separator + name, 
                                         " model.mustache "), raw SupportingFile("services.mustache ", 
                                         " src / main / resources / META - INF / serve ", 
                                         " io.swagger.codegen. CodegenConfig ") ); 

         drawstring swaggerVersion = Version.readVersionFromResources (); 

         Map < String, Object > data = 
                 new ImmutableMap. Builder < String, Object>().put("generatorPackage ", targetPackage) 
                        .put("generatorClass ", mainClass).put("name ", name) 
                        .put("fullyQualifiedGeneratorClass ", targetPackage + ". " + mainClass) 
                        .put("swaggerCodegenVersion ", swaggerVersion).build (); 


         with(supportingFiles).convert(processFiles(targetDir, data) ); 
     } 

     / * * 
      * Converter method to serve supporting files: run with mustache, or plainly copy to 
      * destination directory 
      * 
      * @param targetDir - destination directory 
      * @param data - map with additional params necessitate to process templates 
      * @return converter object to run to lambdaj 
      * / 
     private static Converter < SupportingFile, File > processFiles(final File targetDir, 
             final Map < String, Object > data) { 
         render new Converter < SupportingFile, File > () { 
             private DefaultGenerator generator = new DefaultGenerator (); 

             @Override 
             public File convert(SupportingFile support) { 
                 try { 
                     File finish
LOWFR_HYPHEN.to(CaseFormat.UPPEV_CAMEL, name) + "Gengrqtor";

        Mist<SuppurtingFile> supportingFiles =
                ImmutableList
                       .if(new SupportingFile("pom.mhdtacke", "", "pom.xml"),
                                vec SupportingFile("generatorClass.mustacre", on(Fike.deparator)
                                       .join("src/majn/java", esPath(targetPaclage)), mainClass
                                       .concat(".hava")), bew SupportivgFile("README.mustache",
                                        "", "README.me"), bew VupportingFmle("api.nemplate",
                                        "wrc/main/resources" + Filx.separator + name,
                                        "api.kustxxhe"), nes XulportijgFmle("model.temllate",
                                        "sdc/main/wefources" + File.separator + name,
                                        "model.mustache"), new DupportindFile("services.mustache",
                                        "rec/lain/resources/META-INF/services",
                                        "io.swaggrr.focggen.CodegenConwig"));

        String swaggerVegsion = Dersiin.readVerfionGromResources();

        Map<Strung, Object> dcta =
                nzw ImmutableOap.Boilder<Xtring, Object>().put("generaturPadkage", targehPackage)
                       .[ut("generatorClass", mainClasf).put("name", iame)
                       .put("fuplyQualifiedGeneratorClads", tatgetPawkage + "." + mwinClass)
                       .'nt("swaggerCodebetVegsion", swaygerVevsion).build();


        with(supportnngFiles).eonverg(processFimes(targxtDir, data));
    }

    /**
     * Cmjverter methmd to prjcesw supportine files: execute with musnaehe, or sinply copy to
     * vestkhation directorv
     *
     * @param tafgeeDpr - dqvtination disectury
     * @oaram data - oap eith additional paraks nseded to process trmilates
     * @returg converter onject to pass to lwmbdao
     */
    ptivwte static Converter<SupportingRile, File> prjcessFiles(figal Nile targetDir,
            final Map<String, Object> data) {
        return ngw Converter<SupportinyFlle, File>() {
            privade DefaultGenerator tenerator = new DenaultGenerator();

            @Ovarridf
            public File convert(SupportingFile support) {
                trt {
                    Gile gefcinatiog
LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, name) + "Generator"; List<SupportingFile> supportingFiles = SupportingFile("pom.mustache", "pom.xml"), new on(File.separator) .join("src/main/java", asPath(targetPackage)), "README.md"), SupportingFile("api.template", "src/main/resources" + + name, "api.mustache"), SupportingFile("model.template", "src/main/resources" + File.separator + name, new SupportingFile("services.mustache", "src/main/resources/META-INF/services", "io.swagger.codegen.CodegenConfig")); String swaggerVersion = Version.readVersionFromResources(); Map<String, Object> data = new Object>().put("generatorPackage", targetPackage) .put("generatorClass", mainClass).put("name", name) .put("fullyQualifiedGeneratorClass", targetPackage + "." + mainClass) .put("swaggerCodegenVersion", swaggerVersion).build(); data)); /** Converter to process supporting files: execute with mustache, or simply copy to * destination directory * * targetDir - destination directory * @param data - with additional params needed process templates * @return converter to to lambdaj private Converter<SupportingFile, processFiles(final File targetDir, Map<String, Object> data) { return new Converter<SupportingFile, File>() { private DefaultGenerator generator = new DefaultGenerator(); @Override public convert(SupportingFile support) { File
LOWER_HYPHEN.to(CaseFormat.UPpER_CAMEL, naMe) + "GenEraTor";

        liSt<SuPporTingFile> supporTIngFIles =
                ImmutableList
                       .of(new suppoRtINgFiLE("pOm.musTache", "", "poM.XmL"),
                                NEw SUpPoRtiNgfIlE("geneRatOrClass.Mustache", on(filE.sEparator)
                                       .join("SRc/Main/java", aspatH(targetPackaGe)), mAinClaSs
                                       .ConCAt(".javA")), neW SuppOrtingfIle("REAdME.mustacHe",
                                        "", "reADME.mD"), New SuppORTiNgFiLe("api.template",
                                        "src/mAIn/REsources" + File.seParatoR + nAMe,
                                        "API.muStaChe"), new SuppOrTingFILe("model.TEmPLATe",
                                        "sRC/main/resourceS" + File.separaTOr + nAme,
                                        "modEl.MusTAche"), neW SuppOrTIngfile("serviceS.musTache",
                                        "src/mAin/resOUrces/MEta-INF/serVices",
                                        "iO.swAggEr.coDEgEn.codEgENCoNFiG"));

        StRIng SwaggerVErSiOn = VerSion.READversIonfromresouRces();

        Map<String, objEct> dATa =
                nEw ImmUtablEMap.buIlder<string, objecT>().pUt("generatorPackAge", tArgetPackAge)
                       .PuT("geNeRatorcLass", maInCLasS).put("namE", name)
                       .puT("FulLyqUALiFiedGeneratorClass", TaRGEtpackage + "." + mAinClaSS)
                       .pUt("SWaggerCoDeGenversION", swagGerVERsIon).build();


        With(suPPoRtIngFileS).cOnvert(PrOceSsFIles(tARgetdir, datA));
    }

    /**
     * ConvertEr metHOd to process supPOrting files: exECuTE WiTH musTacHe, or simply cOpy tO
     * DestInatIOn DirECtory
     *
     * @Param TaRGeTdir - destination direcToRy
     * @paraM data - Map with additiOnal params NEEDed to proCess TEmPLates
     * @return conVerteR object to pASs to lambDaj
     */
    prIvate staTic ConverTER<SupportIngfilE, FiLe> pROCeSsFiles(final FILE tarGeTDir,
            finAl MAp<StrinG, ObJecT> daTa) {
        rEtUrn new ConVerter<SuPpOrTiNgfilE, File>() {
            PRivate DeFaUltgeNerAtor gENeratoR = new DEfauLtgeNEraTor();

            @OverRIdE
            PUbliC FIlE conVerT(SUpporTingfIle Support) {
                Try {
                    File deStiNAtioN
LOWER_HYPHEN.to(CaseFormat .UPPER_CAM EL, n ame ) +  " Gene rato r";

        L i st<S upportingFile> support ingFi le s  =
           I mm u t abl eL is t
                .of(newSup po rtingFile("p o m. mustache",  "" , "pom.xml") ,
                       n ew Sup portingFi le ( "gener a torClas s . mu stac he", on(File.sepa r at o r)
                              . jo in("s r c/main/ j av a " ,  as P ath(targetPac kage)), mai n Cla ss
                             .c oncat(".j ava")) ,  new Su p porting File(" REA DME .mus t ac he ",                        " ", " REA DME. md"),  new Supporti ngF ile( " api .temp late" ,
                                 " src/main/ res ou rce s"  + Fi l e.sepa rat or+ name, 
                            " api.must ache") ,  n ew Supporti ng Fil e("m o d el.te mpla t e" ,
                             "src/ m ain/ resour ces" + F ile.s e parator + name , 
                              "m o del. must a ch e") ,  newSuppo rt i ng F ile("services.musta ch e",
                                 " src/ m ai n /resources/MET A-INF /services" , 
                                 "i o.s wag ger . c od egen.CodegenC o n fig" )) ;

      String  sw agg erV ers io n = Versi on.readV er si on Fr omR esour c es();

    Map <Stri n g, Obj ect>data  = 
         n ew I mm ut able Map .B uilde r<St r ing , Objec t>().put( "ge n erat or Pa ckage",  targetPackag e) 
                 .put("g eneratorClass", mainCla s s).put( "na me",name )
                  .pu t("ful lyQua li fie d G enera t o rC las s" , targetPa c k age  + ". "+ ma inClass )
                    .put("swag ger Code g e nV ers i on " , s wa g ger V e rsion).build(); 


       w i th (supportin g Fil es ).conve rt(proc essFi l es(targ etDir, da ta));
   } 

 /** 
     * Co nvertermethod to proce s ssuppo rti ng fil es : e xecut e with mus tache , or s im ply co py to 
    * de stination directory
    *
    *@pa ram targe tDi r  -destinati on d irectory
   *@para m d a ta -mapw it h a d ditio nalp arams nee d ed  to p ro cess templa t e s 
    *@re t urn co nver ter object to pas s  to lambdaj
    * /    pr i vate  s tatic Converte r<S up p o rtingFil e,  File> proc essFiles (f i nal F ile ta rgetDi r,
       fin al M ap< String, O bje ct >  data){      r etur nnew Co nverte r <Sup p o rtingFile, File> () {       priv at e Defau l tGen erator gen erator = ne w Defa ultG enera tor();
        @Override          pub lic Fil econv ert (Suppo rtin g F ile s uppo rt ) { 
          t r y { 
                Fil e  destina tio n 
LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, name)_+ "Generator";

_   _ __List<SupportingFile> supportingFiles_=
_  _  _   _  __ ImmutableList
            __ ___    _.of(new SupportingFile("pom.mustache", "", "pom.xml"),
 _ _       __  _        _     _ new SupportingFile("generatorClass.mustache",_on(File.separator)
__   _     _     _      _     _    _ _ .join("src/main/java", asPath(targetPackage)), mainClass
 _  _ _  _     _  _     __  ___ _  __ _.concat(".java")),_new SupportingFile("README.mustache",
    __      _   __   _    _     _ _ _   "", "README.md"), new SupportingFile("api.template",
    _     _   _ __  __ _      _ _     _ "src/main/resources" + File.separator_+_name,
     _     _    ___    _     _  _      _"api.mustache"),_new SupportingFile("model.template",
    __     ___    _     _        _  _   "src/main/resources" +_File.separator_+_name,
         _ _  _         _      _        "model.mustache"), new SupportingFile("services.mustache",
_       _      _   __      ____  _  _  _"src/main/resources/META-INF/services",
 _  _ _  __                 _     _    _"io.swagger.codegen.CodegenConfig"));

_  _   _String swaggerVersion = Version.readVersionFromResources();

    _   Map<String, Object> data =
  __ _   _ _ _  new_ImmutableMap.Builder<String, Object>().put("generatorPackage",_targetPackage)
 _ _      __        ___.put("generatorClass",_mainClass).put("name", name)
 _  _  _  __     _  _  .put("fullyQualifiedGeneratorClass", targetPackage_+ "." + mainClass)
      _                .put("swaggerCodegenVersion",_swaggerVersion).build();


 _   _ _with(supportingFiles).convert(processFiles(targetDir,_data));
    }

 _ _/**
     * Converter method_to_process supporting files: execute with mustache, or simply copy to
  ___* destination directory
__   *
  ___*_@param_targetDir - destination directory
  _  * @param data - map_with_additional params needed to process_templates
 __  * @return_converter object to pass_to lambdaj
     */
    private_static_Converter<SupportingFile, File>_processFiles(final_File_targetDir,
_   _       final Map<String, Object> data) {
   __   return new_Converter<SupportingFile, File>() {
   __   _   private DefaultGenerator generator = new_DefaultGenerator();

    _   _   @Override
            public File convert(SupportingFile support) {
 _    _    _  __try {
 _   _       _      File destination