Interface HookControl<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T noHook()
      Disable all hooks from actual element.
      T noHook​(java.lang.Class<? extends FluentHook>... hooks)
      Disable given hook from actual element.
      <R> R noHook​(java.lang.Class<? extends FluentHook> hook, java.util.function.Function<T,​R> function)
      Invoke a function with no hook.
      <R> R noHook​(java.util.function.Function<T,​R> function)
      Invoke a function with no hook.
      T noHookInstance()
      Creates a new element locator instance with all hooks disabled.
      T noHookInstance​(java.lang.Class<? extends FluentHook>... hooks)
      Creates a new element locator instance with given hook disabled.
      T restoreHooks()
      Retore hooks that were defined initially.
      <O,​H extends FluentHook<O>>
      T
      withHook​(java.lang.Class<H> hook)
      Enable a hook with default options.
      <O,​H extends FluentHook<O>>
      T
      withHook​(java.lang.Class<H> hook, O options)
      Enable a hook with given options.
    • Method Detail

      • noHook

        T noHook()
        Disable all hooks from actual element.
        Returns:
        this object reference to chain calls
      • noHook

        T noHook​(java.lang.Class<? extends FluentHook>... hooks)
        Disable given hook from actual element.
        Parameters:
        hooks - hook classes to disable
        Returns:
        this object reference to chain calls
      • restoreHooks

        T restoreHooks()
        Retore hooks that were defined initially.
        Returns:
        this object reference to chain calls
      • withHook

        <O,​H extends FluentHook<O>> T withHook​(java.lang.Class<H> hook)
        Enable a hook with default options.
        Type Parameters:
        O - Type of the hook
        H - Type of the hook options
        Parameters:
        hook - hook class to enable
        Returns:
        this object reference to chain calls
      • withHook

        <O,​H extends FluentHook<O>> T withHook​(java.lang.Class<H> hook,
                                                     O options)
        Enable a hook with given options.
        Type Parameters:
        O - Type of the hook
        H - Type of the hook options
        Parameters:
        hook - hook class to enable
        options - hook options to apply
        Returns:
        this object reference to chain calls
      • noHook

        <R> R noHook​(java.util.function.Function<T,​R> function)
        Invoke a function with no hook.
        Type Parameters:
        R - return type
        Parameters:
        function - function to invoke
        Returns:
        return value of the given function
      • noHook

        <R> R noHook​(java.lang.Class<? extends FluentHook> hook,
                     java.util.function.Function<T,​R> function)
        Invoke a function with no hook.
        Type Parameters:
        R - return type
        Parameters:
        hook - hook class to disable
        function - function to invoke
        Returns:
        return value of the given function
      • noHookInstance

        T noHookInstance()
        Creates a new element locator instance with all hooks disabled.
        Returns:
        new element locator with hook disabled.
      • noHookInstance

        T noHookInstance​(java.lang.Class<? extends FluentHook>... hooks)
        Creates a new element locator instance with given hook disabled.
        Parameters:
        hooks - hook classes to disable
        Returns:
        new element locator with hook disabled.