Class DefaultComponentInstantiator

    • Constructor Detail

      • DefaultComponentInstantiator

        public DefaultComponentInstantiator​(FluentControl control)
        Creates a new component instantiator, using given fluent control.
        Parameters:
        control - control interface
      • DefaultComponentInstantiator

        public DefaultComponentInstantiator​(FluentControl control,
                                            ComponentInstantiator instantiator)
        Creates a new component instantiator, using given fluent control and underlying instantiator.
        Parameters:
        control - control interface
        instantiator - component instantiator
    • Method Detail

      • isComponentClass

        public boolean isComponentClass​(Class<?> componentClass)
        Description copied from interface: ComponentInstantiator
        Check if this class is a component class.
        Parameters:
        componentClass - class to check
        Returns:
        true if this class is a component class, false otherwise
      • isComponentListClass

        public boolean isComponentListClass​(Class<? extends List<?>> componentListClass)
        Description copied from interface: ComponentInstantiator
        Check if this class is a component list class.
        Parameters:
        componentListClass - class to check
        Returns:
        true if this class is a component list class, false otherwise
      • newComponent

        public <T> T newComponent​(Class<T> componentClass,
                                  org.openqa.selenium.WebElement element)
        Description copied from interface: ComponentInstantiator
        Create and register a new component from the given element.
        Type Parameters:
        T - type of the component
        Parameters:
        componentClass - type of the component
        element - wrapped element
        Returns:
        new instance of the component
      • newComponentList

        public <L extends List<T>,​T> L newComponentList​(Class<L> listClass,
                                                              Class<T> componentClass,
                                                              List<T> componentsList)
        Description copied from interface: ComponentInstantiator
        Create and register a new list of component from the given component list.
        Type Parameters:
        L - type of the list
        T - type of the component
        Parameters:
        listClass - type of the list
        componentClass - type of the component
        componentsList - components list
        Returns:
        new list of components