Package net.jqwik.api.lifecycle
Interface ResolveParameterHook
- 
- All Superinterfaces:
- LifecycleHook
 - All Known Implementing Classes:
- PerProperty.PerPropertyHook
 - Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
 @API(status=MAINTAINED, since="1.4.0") @FunctionalInterface public interface ResolveParameterHook extends LifecycleHookThis hook type allows to provide parameters for property methods but also to annotated lifecycle methods.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceResolveParameterHook.ParameterSupplierA functional interface specialized on providing parameters to property methods and to annotated lifecycle methods.
 - 
Field SummaryFields Modifier and Type Field Description static ResolveParameterHookDO_NOT_RESOLVE
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<ResolveParameterHook.ParameterSupplier>resolve(ParameterResolutionContext parameterContext, LifecycleContext lifecycleContext)This method will be called only once per property, whereas the returned supplier's get method is usually invoked for each try - and potentially more often during shrinking or when resolving parameters in before/after methods.- 
Methods inherited from interface net.jqwik.api.lifecycle.LifecycleHookappliesTo, propagateTo
 
- 
 
- 
- 
- 
Field Detail- 
DO_NOT_RESOLVE@API(status=INTERNAL) static final ResolveParameterHook DO_NOT_RESOLVE 
 
- 
 - 
Method Detail- 
resolvejava.util.Optional<ResolveParameterHook.ParameterSupplier> resolve(ParameterResolutionContext parameterContext, LifecycleContext lifecycleContext) This method will be called only once per property, whereas the returned supplier's get method is usually invoked for each try - and potentially more often during shrinking or when resolving parameters in before/after methods. The returned supplier should always return an equivalent object, i.e. an object that behaves the same when used in the same way.- Parameters:
- parameterContext- Contains information of parameter to resolve
- lifecycleContext- Can be of type ContainerLifecycleContext or PropertyLifecycleContext
- Returns:
- supplier instance wrapped in Optional or Optional.empty() if it cannot be resolved
 
 
- 
 
-