Class AdaptableScopes
- java.lang.Object
-
- org.eclipse.gef.common.adapt.inject.AdaptableScopes
-
public class AdaptableScopes extends java.lang.ObjectA 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 lastenteredscope 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 anAdaptableScopefor 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 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.
-
-