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

## Class AdapterMaps

- java.lang.Object
- - org.eclipse.gef.common.adapt.inject.AdapterMaps

    public class AdapterMaps
    extends java.lang.Object

A utility class to obtain a `MapBinder`, via which adapter (map) bindings can be specified in a `Module`.

### Method Summary

All Methods Static Methods Concrete Methods
`static MapBinder<AdapterKey<?>,​java.lang.Object>` `getAdapterMapBinder​(Binder binder, java.lang.Class<? extends IAdaptable> adaptableType)` Returns a `MapBinder`, which can be used to define adapter bindings for an `IAdaptable`s of the given type.

`static MapBinder<AdapterKey<?>,​java.lang.Object>`

`getAdapterMapBinder​(Binder binder, java.lang.Class<? extends IAdaptable> adaptableType, AdapterKey<?>... adaptableContext)`

Returns a `MapBinder`, which can be used to define adapter bindings for an `IAdaptable`s of the given type, restricting it further to those `IAdaptable`s that are themselves `adapted` to another `IAdaptable` with the specified role.

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

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

### Method Detail

#### getAdapterMapBinder

    public static MapBinder<AdapterKey<?>,​java.lang.Object> getAdapterMapBinder​(Binder binder,
                                                                                      java.lang.Class<? extends IAdaptable> adaptableType)

Returns a `MapBinder`, which can be used to define adapter bindings for an `IAdaptable`s of the given type.

Parameters:
  `binder` - The `Binder` used to create a new `MapBinder`.
  `adaptableType` - The type to be used as type of the `AdapterMap`.
Returns:
  A new `MapBinder` used to define adapter map bindings for the given type (and all sub-types).

#### getAdapterMapBinder

    public static MapBinder<AdapterKey<?>,​java.lang.Object> getAdapterMapBinder​(Binder binder,
                                                                                      java.lang.Class<? extends IAdaptable> adaptableType,
                                                                                      AdapterKey<?>... adaptableContext)

Returns a `MapBinder`, which can be used to define adapter bindings for an `IAdaptable`s of the given type, restricting it further to those `IAdaptable`s that are themselves `adapted` to another `IAdaptable` with the specified role.

Parameters:
  `binder` - The `Binder` used to create a new `MapBinder`.
  `adaptableType` - The type to be used as type of the `AdapterMap`.
  `adaptableContext` - A specification of the context the adaptable, into which adapters are to be injected, has to provide. If specified the injection will be restricted to `IAdaptable`s with a compatible context only. The context of an adaptable is compatible when respective context elements are visited in the given order when walking the adaptable-adapter chain, beginning with the adaptable in which to inject. The actual chain may contain additional elements, that do not correspond to context element, in between (which are ignored), but it has to contain the specified context elements in the given order.
Returns:
  A new `MapBinder` used to define adapter map bindings for the given type (and all sub-types).