Class IconSetDetector

java.lang.Object
com.vaadin.copilot.iconset.IconSetDetector

public class IconSetDetector extends Object
Detects icon sets available on the application classpath and resolves icon metadata from either icon attribute values or SVG source URLs.
  • Method Details

    • getInstance

      public static IconSetDetector getInstance()
      Gets the singleton detector instance.
      Returns:
      the shared detector instance
    • detect

      public List<IconSetInfo> detect()
      Detects the icon sets that are available in the current application.

      The detected result is cached after the first call.

      Returns:
      the detected icon sets ordered by their configured priority
    • findBySvgUrlOrIconAttr

      public IconAndSetClassNameInfo findBySvgUrlOrIconAttr(String svgUrlOrName)
      Finds icon metadata by either an icon attribute value or an SVG source URL.
      Parameters:
      svgUrlOrName - the icon attribute value or SVG source URL to match
      Returns:
      the matching icon metadata, or null if no match is found