Class IdCollector
java.lang.Object
com.vaadin.flow.component.template.internal.IdCollector
Collects information of
@Id
mapped fields in a template class.
For internal use only. May be renamed or removed in a future release.
- Since:
-
Constructor Summary
ConstructorDescriptionIdCollector
(Class<?> templateClass, String templateFile, org.jsoup.nodes.Element templateRoot) Creates a collector the the given template. -
Method Summary
Modifier and TypeMethodDescriptionvoid
collectInjectedIds
(Set<String> notInjectableElementIds) Scans the given template class and finds fields mapped using@Id
.Gets a map from field ids to their parsed attributes values.Gets a map from fields to their ids.Gets a map from field ids to their component tags.
-
Constructor Details
-
IdCollector
public IdCollector(Class<?> templateClass, String templateFile, org.jsoup.nodes.Element templateRoot) Creates a collector the the given template.- Parameters:
templateClass
- the template class, containing the@Id
fieldstemplateFile
- The name of the file containing the template ornull
if not availablenull
templateRoot
- The root element of the template ornull
if not available
-
-
Method Details
-
collectInjectedIds
Scans the given template class and finds fields mapped using@Id
.- Parameters:
notInjectableElementIds
- ids which cannot be injected
-
getIdByField
Gets a map from fields to their ids.- Returns:
- a map from fields to the ids
-
getTagById
Gets a map from field ids to their component tags.- Returns:
- a map from field ids to their component tags
-
getAttributes
Gets a map from field ids to their parsed attributes values.- Returns:
- a map from field ids to their parsed attributes values
-