# Uses of Class
org.eclipse.gef.common.adapt.AdapterKey

Packages that use AdapterKey
Package
Description
org.eclipse.gef.common.adapt
This package provides abstractions and implementations related to an enhanced adaptable-pattern.
org.eclipse.gef.common.adapt.inject
This package provides support for Google Guice-based injection of adapters.

## Uses of AdapterKey in org.eclipse.gef.common.adapt

Methods in org.eclipse.gef.common.adapt that return AdapterKey
Modifier and Type
Method
Description
`static AdapterKey<?>`
AdapterKey.`defaultRole()`
Returns an `AdapterKey` with no type key and the 'default' role, which can only be used in adapter map bindings.
`static <T> AdapterKey<T>`
AdapterKey.`get(TypeToken<T> key)`
Creates a new `AdapterKey` for the given type key and the `DEFAULT_ROLE` role, which can be used to retrieve an adapter from an IAdaptable.
`static <T> AdapterKey<T>`
AdapterKey.`get(TypeToken<T> key, String role)`
Creates a new `AdapterKey` for the given key and role, which can be used to retrieve an adapter from an IAdaptable.
`static <T> AdapterKey<T>`
AdapterKey.`get(Class<T> key)`
Creates a new `AdapterKey` for the given raw type key and the `DEFAULT_ROLE` role, which can be used to retrieve an adapter from an IAdaptable.
`static <T> AdapterKey<T>`
AdapterKey.`get(Class<T> key, String role)`
Creates a new `AdapterKey` for the given key and role.
`<T> AdapterKey<T>`
AdaptableSupport.`getAdapterKey(T adapter)`
Returns the key under which the given adapter is bound.
`<T> AdapterKey<T>`
AdapterStore.`getAdapterKey(T adapter)`
`<T> AdapterKey<T>`
IAdaptable.`getAdapterKey(T adapter)`
Returns the key under which the given adapter is bound.
`static AdapterKey<?>`
AdapterKey.`role(String role)`
Returns an `AdapterKey` with no type key and the given role, which can only be used in adapter map bindings.
Methods in org.eclipse.gef.common.adapt that return types with arguments of type AdapterKey
Modifier and Type
Method
Description
`javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,Object>`
AdaptableSupport.`adaptersProperty()`
Returns a read-only map property, containing the adapters mapped to their keys.
`javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,Object>`
AdapterStore.`adaptersProperty()`
`javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,Object>`
IAdaptable.`adaptersProperty()`
Returns an unmodifiable read-only map property that contains the registered adapters by their keys.
`javafx.collections.ObservableMap<AdapterKey<?>,Object>`
AdaptableSupport.`getAdapters()`
Retrieves all registered adapters, mapped to the respective `AdapterKey`s they are registered.
`<T> Map<AdapterKey<? extends T>,T>`
AdaptableSupport.`getAdapters(TypeToken<? super T> key)`
Returns all adapters 'matching' the given `TypeToken` key, i.e. all adapters whose `AdapterKey`'s `TypeToken` key `getKey()`) refers to the same or a sub-type or of the given `TypeToken` key.
`<T> Map<AdapterKey<? extends T>,T>`
AdaptableSupport.`getAdapters(Class<? super T> key)`
Returns all adapters 'matching' the given `Class` key, i.e. all adapters whose `AdapterKey`'s `TypeToken` key `getKey()`) refers to the same or a sub-type of the given `Class` key.
`javafx.collections.ObservableMap<AdapterKey<?>,Object>`
AdapterStore.`getAdapters()`
Gets the value of the property adapters.
`<T> Map<AdapterKey<? extends T>,T>`
AdapterStore.`getAdapters(TypeToken<? super T> key)`
`<T> Map<AdapterKey<? extends T>,T>`
AdapterStore.`getAdapters(Class<? super T> key)`
`javafx.collections.ObservableMap<AdapterKey<?>,Object>`
IAdaptable.`getAdapters()`
Returns an unmodifiable `ObservableMap` that contains the registered adapters by their keys.
`<T> Map<AdapterKey<? extends T>,T>`
IAdaptable.`getAdapters(TypeToken<? super T> key)`
Returns all adapters 'matching' the given `TypeToken` key, i.e. all adapters whose `AdapterKey`'s `TypeToken` key `getKey()`) refers to the same or a sub-type or of the given `TypeToken` key.
`<T> Map<AdapterKey<? extends T>,T>`
IAdaptable.`getAdapters(Class<? super T> key)`
Returns all adapters 'matching' the given `Class` key, i.e. all adapters whose `AdapterKey`'s `TypeToken` key `getKey()`) refers to the same or a sub-type of the given `Class` key.
Methods in org.eclipse.gef.common.adapt with parameters of type AdapterKey
Modifier and Type
Method
Description
`int`
AdapterKey.`compareTo(AdapterKey<T> o)`
`<T> T`
AdaptableSupport.`getAdapter(AdapterKey<T> key)`
Returns an adapter for the given `AdapterKey` if one can unambiguously be retrieved, i.e. if there is only a single adapter registered under a key that 'matches' the given `AdapterKey`.
`<T> T`
AdapterStore.`getAdapter(AdapterKey<T> key)`
`<T> T`
IAdaptable.`getAdapter(AdapterKey<T> key)`
Returns an adapter for the given `AdapterKey` if one can unambiguously be retrieved, i.e. if there is only a single adapter that 'matches' the given `AdapterKey`.

## Uses of AdapterKey in org.eclipse.gef.common.adapt.inject

Methods in org.eclipse.gef.common.adapt.inject that return types with arguments of type AdapterKey
Modifier and Type
Method
Description
`static MapBinder<AdapterKey<?>,Object>`
AdapterMaps.`getAdapterMapBinder(Binder binder, 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<?>,Object>`
AdapterMaps.`getAdapterMapBinder(Binder binder, 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 in org.eclipse.gef.common.adapt.inject with parameters of type AdapterKey
Modifier and Type
Method
Description
`static MapBinder<AdapterKey<?>,Object>`
AdapterMaps.`getAdapterMapBinder(Binder binder, 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.