final TypeElement element = env.getElementUtils().getTypeElement(Entity.class.getName());
if (annotations.contains(element)) {
try {
Configuration cfg = new Configuration();
cfg.setObjectWrapper(new DefaultObjectWrapper());
cfg.setTemplateLoader(new ClassTemplateLoader(getClass(), "/templates"));
Template template = cfg.getTemplate("criteria.ftl");
for (TypeElement typeElement : ElementFilter.typesIn(roundEnv.getElementsAnnotatedWith(Entity.class))) {
generate(template, typeElement);
}
template = cfg.getTemplate("embedded.ftl");