Class AdapterInjectionSupport
- java.lang.Object
-
- com.google.inject.AbstractModule
-
- org.eclipse.gef.common.adapt.inject.AdapterInjectionSupport
-
- All Implemented Interfaces:
Module
public class AdapterInjectionSupport extends AbstractModule
A configuration module that can be installed (viaBinder.install(Module)) to enable support for injection of adapters intoIAdaptables. The adapters that are to be injected can be configured through respective adapter (map) bindings (seeAdapterMap). Injection is performed on allIAdaptables that are eligible for adapter injection (seeInjectAdapters).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAdapterInjectionSupport.LoggingModeTheAdapterInjectionSupport.LoggingModespecifies if binding-related information and warning messages should be printed.
-
Constructor Summary
Constructors Constructor Description AdapterInjectionSupport()Constructs a newAdapterInjectionSupportinAdapterInjectionSupport.LoggingMode.DEVELOPMENTmode, i.e. binding-related information, warning, and error messages will be printed.AdapterInjectionSupport(AdapterInjectionSupport.LoggingMode loggingMode)Constructs a newAdapterInjectionSupportand specifies theAdapterInjectionSupport.LoggingModeto use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigure()Binds anAdaptableTypeListener(viaAbstractModule.bindListener(Matcher, TypeListener)) and ensures it gets properly injected (AbstractModule.requestInjection(Object)).-
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
-
AdapterInjectionSupport
public AdapterInjectionSupport()
Constructs a newAdapterInjectionSupportinAdapterInjectionSupport.LoggingMode.DEVELOPMENTmode, i.e. binding-related information, warning, and error messages will be printed.
-
AdapterInjectionSupport
public AdapterInjectionSupport(AdapterInjectionSupport.LoggingMode loggingMode)
Constructs a newAdapterInjectionSupportand specifies theAdapterInjectionSupport.LoggingModeto use. If inAdapterInjectionSupport.LoggingMode.DEVELOPMENTmode, binding-related information, warning, and error messages will be printed. If inAdapterInjectionSupport.LoggingMode.PRODUCTIONmode, only error messages will be printed, and information and warning messages will be suppressed.- Parameters:
loggingMode- TheAdapterInjectionSupport.LoggingModeto use.
-
-
Method Detail
-
configure
protected void configure()
Binds anAdaptableTypeListener(viaAbstractModule.bindListener(Matcher, TypeListener)) and ensures it gets properly injected (AbstractModule.requestInjection(Object)).- Overrides:
configurein classAbstractModule
-
-