Class AdapterInjectionSupport
java.lang.Object
com.google.inject.AbstractModule
org.eclipse.gef.common.adapt.inject.AdapterInjectionSupport
- All Implemented Interfaces:
Module
A configuration module that can be installed (via
Binder.install(Module)
) to enable support for injection of adapters
into IAdaptable
s. The adapters that are to be injected can be
configured through respective adapter (map) bindings (see AdapterMap
). Injection is performed on all IAdaptable
s that are eligible for
adapter injection (see InjectAdapters
).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
TheAdapterInjectionSupport.LoggingMode
specifies if binding-related information and warning messages should be printed. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newAdapterInjectionSupport
inAdapterInjectionSupport.LoggingMode.DEVELOPMENT
mode, i.e. binding-related information, warning, and error messages will be printed.Constructs a newAdapterInjectionSupport
and specifies theAdapterInjectionSupport.LoggingMode
to use. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
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, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Constructor Details
-
AdapterInjectionSupport
public AdapterInjectionSupport()Constructs a newAdapterInjectionSupport
inAdapterInjectionSupport.LoggingMode.DEVELOPMENT
mode, i.e. binding-related information, warning, and error messages will be printed. -
AdapterInjectionSupport
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 Details
-
configure
protected void configure()Binds anAdaptableTypeListener
(viaAbstractModule.bindListener(Matcher, TypeListener)
) and ensures it gets properly injected (AbstractModule.requestInjection(Object)
).- Overrides:
configure
in classAbstractModule
-