use of org.whole.lang.pojo.model.Template in project whole by wholeplatform.
the class PojoNormalizerVisitor method resolveTemplateNameCollisionsInDeclarations.
public static void resolveTemplateNameCollisionsInDeclarations(Library entity, IBindingManager bindings, FreshNameGenerator entityNameGenerator) {
Path findAllProductDeclarationsWithTemplateName = (Path) PojoTemplateManager.instance().create("findAllProductDeclarationsWithTemplateName");
bindings.wEnterScope();
for (ProductDeclaration declaration : BehaviorUtils.<ProductDeclaration>compileAndLazyEvaluate(findAllProductDeclarationsWithTemplateName, entity, bindings)) {
Template template = declaration.getTemplate();
template.wSetValue(entityNameGenerator.nextFreshName(StringUtils.toSimpleName(template.wStringValue())));
}
bindings.wExitScope();
}
Aggregations