Template template = _templates.get(name);
if(null == template){
try {
template = engine.getTemplate(name);
} catch (ResourceNotFoundException e) {
throw new GeneratorException(e.getLocalizedMessage());
} catch (ParseErrorException e) {
throw new GeneratorException(e.getLocalizedMessage());
} catch (Exception e) {
throw new GeneratorException(e.getLocalizedMessage());
}
_templates.put(name, template);
}
return template;
}