Package net.jqwik.api
Class PropertyDefaults.PropertyDefaultsHook
- java.lang.Object
 - 
- net.jqwik.api.PropertyDefaults.PropertyDefaultsHook
 
 
- 
- All Implemented Interfaces:
 AroundPropertyHook,LifecycleHook
- Enclosing class:
 - PropertyDefaults
 
public static class PropertyDefaults.PropertyDefaultsHook extends java.lang.Object implements AroundPropertyHook
 
- 
- 
Field Summary
- 
Fields inherited from interface net.jqwik.api.lifecycle.AroundPropertyHook
BASE 
 - 
 
- 
Constructor Summary
Constructors Constructor Description PropertyDefaultsHook() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanappliesTo(java.util.Optional<java.lang.reflect.AnnotatedElement> element)This method is called once per hook and potential element during lifecycle hooks registration.PropertyExecutionResultaroundProperty(PropertyLifecycleContext context, PropertyExecutor property)When you wrap a property you can do stuff before and/or after its execution.intaroundPropertyProximity()The higher the value, the closer to the actual property method.PropagationModepropagateTo()Override this method if you want to change a concrete hook implementation's default propagation behaviour: Do not use hook in child elements -- sub containers or properties.- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface net.jqwik.api.lifecycle.AroundPropertyHook
compareTo 
 - 
 
 - 
 
- 
- 
Method Detail
- 
aroundProperty
public PropertyExecutionResult aroundProperty(PropertyLifecycleContext context, PropertyExecutor property)
Description copied from interface:AroundPropertyHookWhen you wrap a property you can do stuff before and/or after its execution. All implementors should invoke the property withproperty.execute()and either return the result of this call or map it to another result.- Specified by:
 aroundPropertyin interfaceAroundPropertyHook- Parameters:
 context- The property's context objectproperty- An executor to run the property- Returns:
 - The result of running the property
 
 
- 
aroundPropertyProximity
public int aroundPropertyProximity()
Description copied from interface:AroundPropertyHookThe higher the value, the closer to the actual property method. Default value is 0.Values greater than -10 will make it run "inside" annotated lifecycle methods (BeforeProperty and AfterProperty).
- Specified by:
 aroundPropertyProximityin interfaceAroundPropertyHook- Returns:
 - an integer value
 
 
- 
propagateTo
public PropagationMode propagateTo()
Description copied from interface:LifecycleHookOverride this method if you want to change a concrete hook implementation's default propagation behaviour: Do not use hook in child elements -- sub containers or properties.- Specified by:
 propagateToin interfaceLifecycleHook- Returns:
 - propagation mode enum
 
 
- 
appliesTo
public boolean appliesTo(java.util.Optional<java.lang.reflect.AnnotatedElement> element)
Description copied from interface:LifecycleHookThis method is called once per hook and potential element during lifecycle hooks registration.- Specified by:
 appliesToin interfaceLifecycleHook- Parameters:
 element- The Optional instance contains element for container classes or method but is empty for the engine- Returns:
 - true if a hook shall be applied to this element
 
 
 - 
 
 -