Package org.eclipse.gef.common.adapt.inject

# 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 (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 Classes
Modifier and Type
Class
Description
`static enum`
`AdapterInjectionSupport.LoggingMode`
The `AdapterInjectionSupport.LoggingMode` specifies if binding-related information and warning messages should be printed.

## Constructor Summary

Constructors
Constructor
Description
`AdapterInjectionSupport()`
Constructs a new `AdapterInjectionSupport` in `AdapterInjectionSupport.LoggingMode.DEVELOPMENT` mode, i.e. binding-related information, warning, and error messages will be printed.
`AdapterInjectionSupport(AdapterInjectionSupport.LoggingMode loggingMode)`
Constructs a new `AdapterInjectionSupport` and specifies the `AdapterInjectionSupport.LoggingMode` to use.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`configure()`
Binds an `AdaptableTypeListener` (via `AbstractModule.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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AdapterInjectionSupport

public AdapterInjectionSupport()
Constructs a new `AdapterInjectionSupport` in `AdapterInjectionSupport.LoggingMode.DEVELOPMENT` mode, i.e. binding-related information, warning, and error messages will be printed.

### AdapterInjectionSupport

public AdapterInjectionSupport(AdapterInjectionSupport.LoggingMode loggingMode)
Constructs a new `AdapterInjectionSupport` and specifies the `AdapterInjectionSupport.LoggingMode` to use. If in `AdapterInjectionSupport.LoggingMode.DEVELOPMENT` mode, binding-related information, warning, and error messages will be printed. If in `AdapterInjectionSupport.LoggingMode.PRODUCTION` mode, only error messages will be printed, and information and warning messages will be suppressed.

Parameters:
  `loggingMode` - The `AdapterInjectionSupport.LoggingMode` to use.

## Method Details

### configure

protected void configure()
Binds an `AdaptableTypeListener` (via `AbstractModule.bindListener(Matcher, TypeListener)`) and ensures it gets properly injected (`AbstractModule.requestInjection(Object)`).

Overrides:
  `configure` in class `AbstractModule`