Package com.vaadin.copilot.iconset
Class IconSetDetector
java.lang.Object
com.vaadin.copilot.iconset.IconSetDetector
Detects icon sets available on the application classpath and resolves icon
metadata from either icon attribute values or SVG source URLs.
-
Method Summary
Modifier and TypeMethodDescriptiondetect()Detects the icon sets that are available in the current application.findBySvgUrlOrIconAttr(String svgUrlOrName) Finds icon metadata by either an icon attribute value or an SVG source URL.static IconSetDetectorGets the singleton detector instance.
-
Method Details
-
getInstance
Gets the singleton detector instance.- Returns:
- the shared detector instance
-
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
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
nullif no match is found
-