com.vaadin.flow.component.polymertemplate.
Class TemplateInitializer
- java.lang.Object
-
- com.vaadin.flow.component.polymertemplate.TemplateInitializer
-
public class TemplateInitializer extends Object
Template initialization related logic (parse template, create sub-templates, inject elements by id).
Since:
1.0
Author:
Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor and Description TemplateInitializer(PolymerTemplate<?> template, TemplateParser parser, VaadinService service)
Creates a new initializer instance.
-
Method Summary
All Methods Modifier and Type Method and Description Set<String>
getTwoWayBindingPaths()
Gets a set of two way binding paths encountered in the template.
static Optional<Class<? extends Component>>
getUsesClass(Class<? extends PolymerTemplate<?>> templateType, String tagName)
Looks for a component class with the given tag name among the classes used by the given polymer template class.
void
initChildElements()
Initializes child elements.
-
-
-
Constructor Detail
-
TemplateInitializer
public TemplateInitializer(PolymerTemplate<?> template, TemplateParser parser, VaadinService service)
Creates a new initializer instance.
Parameters:
template
- a template to initializeparser
- a template parser instanceservice
- the related service
-
-
Method Detail
-
initChildElements
public void initChildElements()
Initializes child elements.
-
getTwoWayBindingPaths
public Set<String> getTwoWayBindingPaths()
Gets a set of two way binding paths encountered in the template.
Returns:
an unmodifiable collection of two way binding paths
-
getUsesClass
public static Optional<Class<? extends Component>> getUsesClass(Class<? extends PolymerTemplate<?>> templateType, String tagName)
Looks for a component class with the given tag name among the classes used by the given polymer template class. Usage is determined based on the
@Uses
annotation.Parameters:
templateType
- the polymer template typetagName
- the tag name to look forReturns:
an optional component class, or an empty optional if the template doesn't use any component with the given tag name
-
-