@API(status=EXPERIMENTAL,
since="1.0")
public interface LifecycleHook
Modifier and Type | Method and Description |
---|---|
default boolean |
appliesTo(java.util.Optional<java.lang.reflect.AnnotatedElement> element)
This method is called once per hook and potential element during lifecycle hooks registration.
|
default void |
prepareFor(LifecycleContext context)
This method is called when an element, container class or property method,
is found with this hook directly attached or applied to through a parent element.
|
default PropagationMode |
propagateTo() |
@API(status=EXPERIMENTAL, since="1.2.4") default boolean appliesTo(java.util.Optional<java.lang.reflect.AnnotatedElement> element)
element
- The Optional instance contains element for container classes
or method but is empty for the engine@API(status=EXPERIMENTAL, since="1.2.4") default PropagationMode propagateTo()
@API(status=EXPERIMENTAL, since="1.2.4") default void prepareFor(LifecycleContext context)
context
- The context can be a ContainerLifecycleContext
or a PropertyLifecycleContext