use of com.vaadin.flow.component.template.internal.ParserData in project flow by vaadin.
the class LitTemplateDataAnalyzer method parseTemplate.
/**
* Gets the template data for the template initializer.
*
* @return the template data
*/
ParserData parseTemplate() {
TemplateData templateData = parser.getTemplateContent(templateClass, tag, service);
if (templateData == null) {
getLogger().info("Couldn't parse template for {} class. " + "Only specific Lit template format is supported. Please check that your template definition" + " directly contains 'render' method which returns html`_template_content_`.", templateClass);
}
Element templateRoot = templateData == null ? null : templateData.getTemplateElement();
String modulePath = templateData == null ? null : templateData.getModulePath();
IdCollector idExtractor = new IdCollector(templateClass, modulePath, templateRoot);
idExtractor.collectInjectedIds(Collections.emptySet());
return new ParserData(idExtractor.getIdByField(), idExtractor.getTagById(), idExtractor.getAttributes());
}
Aggregations