Class IdCollector

java.lang.Object
com.vaadin.flow.component.template.internal.IdCollector

public class IdCollector extends Object
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 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 fields
      templateFile - The name of the file containing the template or null if not available null
      templateRoot - The root element of the template or null if not available
  • Method Details

    • 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
    • getAttributes

      public Map<String,Map<String,String>> getAttributes()
      Gets a map from field ids to their parsed attributes values.
      Returns:
      a map from field ids to their parsed attributes values