Package de.spraener.nxtgen
Class MustacheGenerator
java.lang.Object
de.spraener.nxtgen.MustacheGenerator
- All Implemented Interfaces:
CodeGenerator
-
Constructor Summary
ConstructorsConstructorDescriptionMustacheGenerator(String mustacheResourcePath, String outputFile, BiConsumer<ModelElement, Map<String, Object>>... buildScriptMapConsumer) -
Method Summary
Modifier and TypeMethodDescriptionresolve(ModelElement modelElement, String templateName) Apply the requested Template to the model Element.
-
Constructor Details
-
MustacheGenerator
public MustacheGenerator(String mustacheResourcePath, String outputFile, BiConsumer<ModelElement, Map<String, Object>>... buildScriptMapConsumer)
-
-
Method Details
-
resolve
Description copied from interface:CodeGeneratorApply the requested Template to the model Element.- Specified by:
resolvein interfaceCodeGenerator- Parameters:
modelElement- a instance of ModelElement to generate code fortemplateName- a Template to apply on the model element.- Returns:
- a not null instance of CodeBlock the can write the code.
-