Package net.jqwik.api.lifecycle
Klasse PerProperty.PerPropertyHook
java.lang.Object
net.jqwik.api.lifecycle.PerProperty.PerPropertyHook
- Alle implementierten Schnittstellen:
AroundPropertyHook
,LifecycleHook
,ResolveParameterHook
- Umschließende Klasse:
PerProperty
public static class PerProperty.PerPropertyHook
extends Object
implements AroundPropertyHook, ResolveParameterHook
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen net.jqwik.api.lifecycle.ResolveParameterHook
ResolveParameterHook.ParameterSupplier
-
Feldübersicht
Von Schnittstelle geerbte Felder net.jqwik.api.lifecycle.AroundPropertyHook
BASE
Von Schnittstelle geerbte Felder net.jqwik.api.lifecycle.ResolveParameterHook
DO_NOT_RESOLVE
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungaroundProperty
(PropertyLifecycleContext context, PropertyExecutor property) When you wrap a property you can do stuff before and/or after its execution.int
The higher the value, the closer to the actual property method.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.Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von Schnittstelle geerbte Methoden net.jqwik.api.lifecycle.AroundPropertyHook
compareTo
Von Schnittstelle geerbte Methoden net.jqwik.api.lifecycle.LifecycleHook
appliesTo, propagateTo
-
Konstruktordetails
-
PerPropertyHook
public PerPropertyHook()
-
-
Methodendetails
-
aroundProperty
public PropertyExecutionResult aroundProperty(PropertyLifecycleContext context, PropertyExecutor property) Beschreibung aus Schnittstelle kopiert:AroundPropertyHook
When 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.- Angegeben von:
aroundProperty
in SchnittstelleAroundPropertyHook
- Parameter:
context
- The property's context objectproperty
- An executor to run the property- Gibt zurück:
- The result of running the property
-
aroundPropertyProximity
public int aroundPropertyProximity()Beschreibung aus Schnittstelle kopiert:AroundPropertyHook
The 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).
- Angegeben von:
aroundPropertyProximity
in SchnittstelleAroundPropertyHook
- Gibt zurück:
- an integer value
-
resolve
public Optional<ResolveParameterHook.ParameterSupplier> resolve(ParameterResolutionContext parameterContext, LifecycleContext lifecycleContext) Beschreibung aus Schnittstelle kopiert:ResolveParameterHook
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.- Angegeben von:
resolve
in SchnittstelleResolveParameterHook
- 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
-