Package net.jqwik.api.lifecycle
Schnittstelle ResolveParameterHook
- Alle Superschnittstellen:
LifecycleHook
- Alle bekannten Implementierungsklassen:
PerProperty.PerPropertyHook
- Funktionsschnittstelle:
- Dies ist eine funktionale Schnittstelle, die somit als Zuweisungsziel für einen Lambdaausdruck oder eine Methodenreferenz verwendet werden kann.
@API(status=MAINTAINED,
since="1.4.0")
@FunctionalInterface
public interface ResolveParameterHook
extends LifecycleHook
This hook type allows to provide parameters for property methods
but also to annotated lifecycle methods.
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypSchnittstelleBeschreibungstatic interface
A functional interface specialized on providing parameters to property methods and to annotated lifecycle methods. -
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungresolve
(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.Von Schnittstelle geerbte Methoden net.jqwik.api.lifecycle.LifecycleHook
appliesTo, propagateTo
-
Felddetails
-
DO_NOT_RESOLVE
-
-
Methodendetails
-
resolve
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.- Parameter:
parameterContext
- Contains information of parameter to resolvelifecycleContext
- Can be of type ContainerLifecycleContext or PropertyLifecycleContext- Gibt zurück:
- supplier instance wrapped in Optional or Optional.empty() if it cannot be resolved
-