Package dev.voidframework.core.lifecycle
Class LifeCycleAnnotationListener
java.lang.Object
dev.voidframework.core.lifecycle.LifeCycleAnnotationListener
- All Implemented Interfaces:
com.google.inject.spi.TypeListener
public final class LifeCycleAnnotationListener
extends Object
implements com.google.inject.spi.TypeListener
Listens to the different bind classes to detect which ones have
methods to call when starting or stopping the application.
-
Constructor Summary
ConstructorsConstructorDescriptionLifeCycleAnnotationListener(LifeCycleManager lifeCycleManager) Build a new instance. -
Method Summary
Modifier and TypeMethodDescription<CLASS_TYPE>
voidhear(com.google.inject.TypeLiteral<CLASS_TYPE> type, com.google.inject.spi.TypeEncounter<CLASS_TYPE> encounter)
-
Constructor Details
-
LifeCycleAnnotationListener
Build a new instance.- Parameters:
lifeCycleManager- The life cycle manager to use
-
-
Method Details
-
hear
public <CLASS_TYPE> void hear(com.google.inject.TypeLiteral<CLASS_TYPE> type, com.google.inject.spi.TypeEncounter<CLASS_TYPE> encounter) - Specified by:
hearin interfacecom.google.inject.spi.TypeListener
-