Select Git revision
mappingApplication.mustache

René Schöne authored
- added fail-fast behaviour to mustache (if a name/method can not be resolved) - enabled logging of mustache (using log4j)
mappingApplication.mustache 438 B
{{lastDefinitionToType}} {{resultVarPrefix}}{{lastDefinitionName}};
try {
{{#InnerMappingDefinitions}}
{{^last}}{{ToType}} {{/last}}{{resultVarPrefix}}{{methodName}} = {{methodName}}({{inputVarName}});{{!inputVarName has to be computed beforehand}}
{{/InnerMappingDefinitions}}
} catch (Exception e) {
e.printStackTrace();
{{preemptiveReturn}}
}
{{^alwaysApply}}
if ({{{condition}}}) {
{{preemptiveReturn}}
}
{{/alwaysApply}}