com.vaadin.flow.component.polymertemplate.
Class IdCollector
- java.lang.Object
-
- com.vaadin.flow.component.polymertemplate.IdCollector
-
-
Constructor Summary
Constructors Constructor and Description IdCollector(Class<?> templateClass, String templateFile, org.jsoup.nodes.Element templateRoot)
Creates a collector the the given template.
-
Method Summary
All Methods Modifier and Type Method and Description void
collectInjectedIds(Set<String> notInjectableElementIds)
Scans the given template class and finds fields mapped using
@Id
.Map<String,Map<String,String>>
getAttributes()
Gets a map from field ids to their parsed attributes values.
Map<Field,String>
getIdByField()
Gets a map from fields to their ids.
Map<String,String>
getTagById()
Gets a map from field ids to their component tags.
-
-
-
Constructor Detail
-
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 Detail
-
collectInjectedIds
public void collectInjectedIds(Set<String> notInjectableElementIds)
Scans the given template class and finds fields mapped using
@Id
.Parameters:
notInjectableElementIds
- ids which cannot be injected
-
getIdByField
public Map<Field,String> getIdByField()
Gets a map from fields to their ids.
Returns:
a map from fields to the ids
-
getTagById
public Map<String,String> getTagById()
Gets a map from field ids to their component tags.
Returns:
a map from field ids to their component tags
-
-