- Enclosing class:
Nested Class Summary
Method SummaryModifier and TypeMethodDescriptionWhen you wrap a property you can do stuff before and/or after its execution.
intThe higher the value, the closer to the actual property method.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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aroundPropertypublic 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 with
property.execute()and either return the result of this call or map it to another result.
aroundPropertyProximitypublic int aroundPropertyProximity()Description copied from interface:
AroundPropertyHookThe higher the value, the closer to the actual property method. Default value is 0.
resolvepublic Optional<ResolveParameterHook.ParameterSupplier> resolve
(ParameterResolutionContext parameterContext, LifecycleContext lifecycleContext)Description copied from interface:
ResolveParameterHookThis 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.
- Specified by:
parameterContext- Contains information of parameter to resolve
lifecycleContext- Can be of type ContainerLifecycleContext or PropertyLifecycleContext
- supplier instance wrapped in Optional or Optional.empty() if it cannot be resolved