public static class PerProperty.PerPropertyHook extends java.lang.Object implements AroundPropertyHook, ResolveParameterHook
ResolveParameterHook.ParameterSupplier
BASE
DO_NOT_RESOLVE
Constructor and Description |
---|
PerPropertyHook() |
Modifier and Type | Method and Description |
---|---|
PropertyExecutionResult |
aroundProperty(PropertyLifecycleContext context,
PropertyExecutor property)
When you wrap a property you can do stuff before and/or after its execution.
|
int |
aroundPropertyProximity()
The higher the value, the closer to the actual property method.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareTo
appliesTo, propagateTo
public PropertyExecutionResult aroundProperty(PropertyLifecycleContext context, PropertyExecutor property)
AroundPropertyHook
property.execute()
and either return the result of this call or map it to another result.aroundProperty
in interface AroundPropertyHook
context
- The property's context objectproperty
- An executor to run the propertypublic int aroundPropertyProximity()
AroundPropertyHook
Values greater than -10 will make it run "inside" annotated lifecycle methods (BeforeProperty and AfterProperty).
aroundPropertyProximity
in interface AroundPropertyHook
public java.util.Optional<ResolveParameterHook.ParameterSupplier> resolve(ParameterResolutionContext parameterContext, LifecycleContext lifecycleContext)
ResolveParameterHook
resolve
in interface ResolveParameterHook
parameterContext
- Contains information of parameter to resolvelifecycleContext
- Can be of type ContainerLifecycleContext or PropertyLifecycleContext