Package org.fluentlenium.core.hook
Interface HookControl<T>
-
- Type Parameters:
T
- self type
- All Known Subinterfaces:
FluentList<E>
- All Known Implementing Classes:
FluentListImpl
,FluentWebElement
,HookControlImpl
public interface HookControl<T>
Control interface for hooks.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
noHook()
Disable all hooks from actual element.T
noHook(Class<? extends FluentHook>... hooks)
Disable given hook from actual element.<R> R
noHook(Class<? extends FluentHook> hook, Function<T,R> function)
Invoke a function with no hook.<R> R
noHook(Function<T,R> function)
Invoke a function with no hook.T
noHookInstance()
Creates a new element locator instance with all hooks disabled.T
noHookInstance(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>>
TwithHook(Class<H> hook)
Enable a hook with default options.<O,H extends FluentHook<O>>
TwithHook(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(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(Class<H> hook)
Enable a hook with default options.- Type Parameters:
O
- Type of the hookH
- 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(Class<H> hook, O options)
Enable a hook with given options.- Type Parameters:
O
- Type of the hookH
- Type of the hook options- Parameters:
hook
- hook class to enableoptions
- hook options to apply- Returns:
- this object reference to chain calls
-
noHook
<R> R noHook(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(Class<? extends FluentHook> hook, Function<T,R> function)
Invoke a function with no hook.- Type Parameters:
R
- return type- Parameters:
hook
- hook class to disablefunction
- 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(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.
-
-