| Package | Description |
|---|---|
| org.eclipse.gef4.common.adapt |
This package provides abstractions and implementations related to an enhanced
adaptable-pattern.
|
| org.eclipse.gef4.common.adapt.inject |
This package provides support for Google Guice-based injection of adapters.
|
| Modifier and Type | Method and 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(java.lang.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(java.lang.Class<T> key,
java.lang.String role)
Creates a new
AdapterKey for the given key and role. |
static <T> AdapterKey<T> |
AdapterKey.get(com.google.common.reflect.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(com.google.common.reflect.TypeToken<T> key,
java.lang.String role)
Creates a new
AdapterKey for the given key and role, which can be
used to retrieve an adapter from an IAdaptable. |
<T> AdapterKey<T> |
IAdaptable.getAdapterKey(T adapter)
Returns the key under which the given adapter is bound.
|
<T> AdapterKey<T> |
AdapterStore.getAdapterKey(T adapter) |
<T> AdapterKey<T> |
AdaptableSupport.getAdapterKey(T adapter)
Returns the key under which the given adapter is bound.
|
static AdapterKey<?> |
AdapterKey.role(java.lang.String role)
Returns an
AdapterKey with no type key and the given role, which
can only be used in adapter map bindings. |
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
IAdaptable.adaptersProperty()
Returns an unmodifiable read-only map property that contains the
registered adapters by their keys.
|
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
AdapterStore.adaptersProperty() |
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
AdaptableSupport.adaptersProperty()
Returns a read-only map property, containing the adapters mapped to their
keys.
|
javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> |
IAdaptable.getAdapters()
Returns an unmodifiable
ObservableMap that contains the
registered adapters by their keys. |
javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> |
AdapterStore.getAdapters()
Gets the value of the property adapters.
|
javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> |
AdaptableSupport.getAdapters()
Retrieves all registered adapters, mapped to the respective
AdapterKeys they are registered. |
<T> java.util.Map<AdapterKey<? extends T>,T> |
IAdaptable.getAdapters(java.lang.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 (see TypeToken.isAssignableFrom(Type) ). |
<T> java.util.Map<AdapterKey<? extends T>,T> |
AdapterStore.getAdapters(java.lang.Class<? super T> key) |
<T> java.util.Map<AdapterKey<? extends T>,T> |
AdaptableSupport.getAdapters(java.lang.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 (see TypeToken.isAssignableFrom(Type)). |
<T> java.util.Map<AdapterKey<? extends T>,T> |
IAdaptable.getAdapters(com.google.common.reflect.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 (see
TypeToken.isAssignableFrom(TypeToken)). |
<T> java.util.Map<AdapterKey<? extends T>,T> |
AdapterStore.getAdapters(com.google.common.reflect.TypeToken<? super T> key) |
<T> java.util.Map<AdapterKey<? extends T>,T> |
AdaptableSupport.getAdapters(com.google.common.reflect.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 (see
TypeToken.isAssignableFrom(TypeToken)). |
| Modifier and Type | Method and Description |
|---|---|
int |
AdapterKey.compareTo(AdapterKey<T> o) |
<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. |
<T> T |
AdapterStore.getAdapter(AdapterKey<T> key) |
<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. |
| Modifier and Type | Method and Description |
|---|---|
static com.google.inject.multibindings.MapBinder<AdapterKey<?>,java.lang.Object> |
AdapterMaps.getAdapterMapBinder(com.google.inject.Binder binder,
java.lang.Class<? extends IAdaptable> type)
Returns a
MapBinder, which is bound to an AdapterMap
annotation of the given type, and can thus be used to specify adapter
that are to injected into IAdaptables of the respective type. |
static com.google.inject.multibindings.MapBinder<AdapterKey<?>,java.lang.Object> |
AdapterMaps.getAdapterMapBinder(com.google.inject.Binder binder,
java.lang.Class<? extends IAdaptable> type,
java.lang.String role)
Returns a
MapBinder, which is bound to an AdapterMap
annotation of the given type and role, and can thus be used to specify
adapter that are to injected into IAdaptables of the respective
type and role. |
Copyright (c) 2014 itemis AG and others. All rights reserved.