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 intoIAdaptable
s. The adapters that are to be injected can be configured through respective adapter (map) bindings (seeAdapterMap
). Injection is performed on allIAdaptable
s that are eligible for adapter injection (seeInjectAdapters
).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AdapterInjectionSupport.LoggingMode
TheAdapterInjectionSupport.LoggingMode
specifies if binding-related information and warning messages should be printed.
-
Constructor Summary
Constructors Constructor Description AdapterInjectionSupport()
Constructs a newAdapterInjectionSupport
inAdapterInjectionSupport.LoggingMode.DEVELOPMENT
mode, i.e. binding-related information, warning, and error messages will be printed.AdapterInjectionSupport(AdapterInjectionSupport.LoggingMode loggingMode)
Constructs a newAdapterInjectionSupport
and specifies theAdapterInjectionSupport.LoggingMode
to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configure()
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 newAdapterInjectionSupport
inAdapterInjectionSupport.LoggingMode.DEVELOPMENT
mode, i.e. binding-related information, warning, and error messages will be printed.
-
AdapterInjectionSupport
public AdapterInjectionSupport(AdapterInjectionSupport.LoggingMode loggingMode)
Constructs a newAdapterInjectionSupport
and specifies theAdapterInjectionSupport.LoggingMode
to use. If inAdapterInjectionSupport.LoggingMode.DEVELOPMENT
mode, binding-related information, warning, and error messages will be printed. If inAdapterInjectionSupport.LoggingMode.PRODUCTION
mode, only error messages will be printed, and information and warning messages will be suppressed.- Parameters:
loggingMode
- TheAdapterInjectionSupport.LoggingMode
to use.
-
-
Method Detail
-
configure
protected void configure()
Binds anAdaptableTypeListener
(viaAbstractModule.bindListener(Matcher, TypeListener)
) and ensures it gets properly injected (AbstractModule.requestInjection(Object)
).- Overrides:
configure
in classAbstractModule
-
-