Class IdCollector
- java.lang.Object
-
- com.vaadin.flow.component.template.internal.IdCollector
-
- Direct Known Subclasses:
IdCollector
public class IdCollector extends Object
Collects information of@Idmapped fields in a template class.For internal use only. May be renamed or removed in a future release.
- Since:
-
-
Constructor Summary
Constructors Constructor Description IdCollector(Class<?> templateClass, String templateFile, org.jsoup.nodes.Element templateRoot)Creates a collector the the given template.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollectInjectedIds(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@IdfieldstemplateFile- The name of the file containing the template ornullif not availablenulltemplateRoot- The root element of the template ornullif 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
-
-