Class AdaptableScopes
- java.lang.Object
-
- org.eclipse.gef.common.adapt.inject.AdaptableScopes
-
public class AdaptableScopes extends java.lang.Object
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 lastentered
scope may beleft
. When leaving a scope, the previous state is restored, i.e. the last entered scope will be entered again.- See Also:
AdaptableScope
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <A extends IAdaptable>
org.eclipse.gef.common.adapt.inject.AdaptableScope<A>typed(java.lang.Class<? extends A> type)
Retrieves anAdaptableScope
for the givenIAdaptable
-compliant type.
-
-
-
Method Detail
-
typed
public static <A extends IAdaptable> org.eclipse.gef.common.adapt.inject.AdaptableScope<A> typed(java.lang.Class<? extends A> type)
Retrieves anAdaptableScope
for the givenIAdaptable
-compliant type.- Type Parameters:
A
- TheIAdaptable
(sub-)type to return anAdaptableScope
for.- Parameters:
type
- The type of theAdaptableScope
.- Returns:
- The static
AdaptableScope
instance for the given type.
-
-