@FunctionalInterface
public interface GuiceyLifecycleListener
Example usage: LifecycleDiagnostic.
Listener could also implement GuiceyConfigurationHook
in order to apply special configurations. For example, this could be some diagnostic extensions.
There is no other way to modify configuration in listener.
Listener is not registered if equal listener were already registered (Set used as
listeners storage), so if you need to be sure that only one instance of some listener will be used
implement Object.equals(Object) and Object.hashCode(). For example, this is used to resolve case
where DiagnosticHook installed and some reports were already enabled
in bundle directly: thanks to correct equals in reports, user will not see duplicate reports.
GuiceyLifecycleAdapter| Modifier and Type | Method and Description |
|---|---|
void |
onEvent(GuiceyLifecycleEvent event)
Called with specific lifecycle event.
|
void onEvent(GuiceyLifecycleEvent event)
event - event instancefor possible event types