public static class PropertyDefaults.PropertyDefaultsHook extends java.lang.Object implements AroundPropertyHook
BASE
Constructor and Description |
---|
PropertyDefaultsHook() |
Modifier and Type | Method and Description |
---|---|
boolean |
appliesTo(java.util.Optional<java.lang.reflect.AnnotatedElement> element)
This method is called once per hook and potential element during lifecycle hooks registration.
|
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.
|
PropagationMode |
propagateTo()
Override this method if you want to change a concrete hook implementation's default
propagation behaviour: Do not use hook in child elements -- sub containers or properties.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareTo
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 PropagationMode propagateTo()
LifecycleHook
propagateTo
in interface LifecycleHook
public boolean appliesTo(java.util.Optional<java.lang.reflect.AnnotatedElement> element)
LifecycleHook
appliesTo
in interface LifecycleHook
element
- The Optional instance contains element for container classes
or method but is empty for the engine