Class AdaptableScopes
java.lang.Object
org.eclipse.gef.common.adapt.inject.AdaptableScopes
A utility class to support adaptable-based scoping. It will recursively enter
and leave all transitive adaptable scopes (reachable by navigating the
adaptable chain) for a given adaptable. An internal stack is maintained, so
only the last
entered scope may be
left. When leaving a scope, the previous state is
restored, i.e. the last entered scope will be entered again.- See Also:
-
AdaptableScope
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends IAdaptable>
org.eclipse.gef.common.adapt.inject.AdaptableScope<A>Retrieves anAdaptableScopefor the givenIAdaptable-compliant type.
-
Method Details
-
typed
public static <A extends IAdaptable> org.eclipse.gef.common.adapt.inject.AdaptableScope<A> typed(Class<? extends A> type) Retrieves anAdaptableScopefor the givenIAdaptable-compliant type.- Type Parameters:
A- TheIAdaptable(sub-)type to return anAdaptableScopefor.- Parameters:
type- The type of theAdaptableScope.- Returns:
- The static
AdaptableScopeinstance for the given type.
-