Package net.jqwik.api.lifecycle
Interface AroundContainerHook
- All Superinterfaces:
AfterContainerHook
,BeforeContainerHook
,LifecycleHook
@API(status=MAINTAINED,
since="1.4.0")
public interface AroundContainerHook
extends BeforeContainerHook, AfterContainerHook
An aggregate interface of BeforeContainerHook and AfterContainerHook
for convenience.
-
Field Summary
Fields inherited from interface net.jqwik.api.lifecycle.AfterContainerHook
DO_NOTHING
Fields inherited from interface net.jqwik.api.lifecycle.BeforeContainerHook
DO_NOTHING
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
afterContainer
(ContainerLifecycleContext context) The code of this method will be run exactly once after all property methods and child containers.default int
The higher the value, the closer to the actual property methods, i.e. the earlier it will be run.default void
beforeContainer
(ContainerLifecycleContext context) The code of this method will be run exactly once before any property method or child container.default int
The higher the value, the closer to the actual property methods, i.e. the later it will be run.default int
Determine both beforeContainerProximity() and afterContainerProximity() in one go.Methods inherited from interface net.jqwik.api.lifecycle.AfterContainerHook
compareTo
Methods inherited from interface net.jqwik.api.lifecycle.BeforeContainerHook
compareTo
Methods inherited from interface net.jqwik.api.lifecycle.LifecycleHook
appliesTo, propagateTo
-
Method Details
-
beforeContainer
Description copied from interface:BeforeContainerHook
The code of this method will be run exactly once before any property method or child container.- Specified by:
beforeContainer
in interfaceBeforeContainerHook
- Parameters:
context
- The container's context object- See Also:
-
beforeContainerProximity
default int beforeContainerProximity()Description copied from interface:BeforeContainerHook
The higher the value, the closer to the actual property methods, i.e. the later it will be run. Default value is 0.Values greater than -10 will make it run after methods annotated with BeforeContainer, values smaller than -10 will make it run before.
- Specified by:
beforeContainerProximity
in interfaceBeforeContainerHook
- Returns:
- an integer value
- See Also:
-
afterContainer
Description copied from interface:AfterContainerHook
The code of this method will be run exactly once after all property methods and child containers.- Specified by:
afterContainer
in interfaceAfterContainerHook
- Parameters:
context
- The container's context object- See Also:
-
afterContainerProximity
default int afterContainerProximity()Description copied from interface:AfterContainerHook
The higher the value, the closer to the actual property methods, i.e. the earlier it will be run. Default value is 0.Values greater than -10 will make it run before methods annotated with AfterContainer, values smaller than -10 will make it run after.
- Specified by:
afterContainerProximity
in interfaceAfterContainerHook
- Returns:
- an integer value
- See Also:
-
proximity
default int proximity()Determine both beforeContainerProximity() and afterContainerProximity() in one go.
-