Package ru.vyarus.guice.ext
Class ExtAnnotationsModule
- java.lang.Object
-
- com.google.inject.AbstractModule
-
- ru.vyarus.guice.ext.ExtAnnotationsModule
-
- All Implemented Interfaces:
com.google.inject.Module
public class ExtAnnotationsModule extends com.google.inject.AbstractModuleAdditional annotations support module: @PostConstruct, @PreDestroy, @Log.- Since:
- 29.06.2014
-
-
Constructor Summary
Constructors Constructor Description ExtAnnotationsModule()Default module constructor to check annotations on all beans.ExtAnnotationsModule(com.google.inject.matcher.Matcher<java.lang.Object> typeMatcher)Constructs annotation module with custom bean matcher for annotations processing.ExtAnnotationsModule(java.lang.String pkg)Constructs annotation module with annotation scan limited to provided package.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigure()protected DestroyableManagerconfigureManager(DestroyableManager manager)Registers destroyable manager in injector and adds shutdown hook to process destroy on jvm shutdown.-
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
-
-
-
Constructor Detail
-
ExtAnnotationsModule
public ExtAnnotationsModule()
Default module constructor to check annotations on all beans.
-
ExtAnnotationsModule
public ExtAnnotationsModule(java.lang.String pkg)
Constructs annotation module with annotation scan limited to provided package. (used mainly for startup performance optimization)- Parameters:
pkg- package to limit beans, where annotations processed
-
ExtAnnotationsModule
public ExtAnnotationsModule(com.google.inject.matcher.Matcher<java.lang.Object> typeMatcher)
Constructs annotation module with custom bean matcher for annotations processing.- Parameters:
typeMatcher- matcher to select beans for annotations processing
-
-
Method Detail
-
configure
protected void configure()
- Overrides:
configurein classcom.google.inject.AbstractModule
-
configureManager
protected DestroyableManager configureManager(DestroyableManager manager)
Registers destroyable manager in injector and adds shutdown hook to process destroy on jvm shutdown.- Parameters:
manager- destroyable manager instance- Returns:
- manager instance
-
-