com.vaadin.client.componentlocator.

Class LocatorUtil

  • public class LocatorUtil
    extends Object

    Common String manipulator utilities used in VaadinFinderLocatorStrategy and SelectorPredicates.

    Since:

    7.2

    Author:

    Vaadin Ltd

    • Constructor Detail

      • LocatorUtil

        public LocatorUtil()
    • Method Detail

      • indexOfIgnoringQuoted

        protected static int indexOfIgnoringQuoted​(String str,
                                                   char find,
                                                   int startingAt)

        Find first occurrence of character that's not inside quotes starting from specified index.

        Parameters:

        str - Full string for searching

        find - Character we want to find

        startingAt - Index where we start

        Returns:

        Index of character. -1 if character not found

      • indexOfIgnoringQuoted

        protected static int indexOfIgnoringQuoted​(String str,
                                                   char find)

        Find first occurrence of character that's not inside quotes starting from the beginning of string.

        Parameters:

        str - Full string for searching

        find - Character we want to find

        Returns:

        Index of character. -1 if character not found

      • isUIElement

        public static boolean isUIElement​(String path)

        Checks if path refers to vaadin UI element com.vaadin.ui.UI.

        Parameters:

        path - to vaadin element

        Returns:

        true if path refers to UI element, false otherwise

      • isNotificationElement

        public static boolean isNotificationElement​(String path)

        Checks if path refers to vaadin Notification element com.vaadin.ui.Notification.

        Parameters:

        path - to vaadin element

        Returns:

        true if path refers to Notification element, false otherwise