import java.util.UUID; import lorem.ipsum.javatester.domain.CodeModel; //By convention, the first template command line is a model creation command //and the second template command line is a file creation command <<:model CodeModel model>> <<:file x {UUID.randomUUID().toString()}.txt>> if (model.getName().equals("Lorem Ipsum")) { <<:out x Hello, Lorem!\r\n>> } else if (model.getName() == null) { <<:out x Null???\r\n>> } else { <<:file y hello-{UUID.randomUUID().toString()}>> <<:out y Hello, {model.getName().toUpperCase()} !\r\n>> } //Phase 2 import java.util.UUID; import lorem.ipsum.javatester.domain.CodeModel; import lorem.ipsum.javatester.file.*; //By convention. ... //and the second line has to have a model creation command class GenerativeFunXYZ { public static void generate(CodeModel inputModel, String outputPath) { GeneratedFile x = GeneratesFiles.create(inputPath, ""+UUID.randomUUID().toString()+".txt"); CodeModel model = inputModel; if (model.getName().equals("Lorem Ipsum")) { x.out("Hello, Lorem!\r\n"); } else if (model.getName() == null) { x.out("Null???\r\n"); } else { GeneratedFile y = GeneratesFiles.create(inputPath, "hello-"+UUID.randomUUID().toString()+"\r\n"); y.out("Hello, "+model.getName().toUpperCase()+" !\r\n"); } } }