Class AdaptableScopes

java.lang.Object
org.eclipse.gef.common.adapt.inject.AdaptableScopes

public class AdaptableScopes extends 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 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 Details

    • typed

      public static <A extends IAdaptable> org.eclipse.gef.common.adapt.inject.AdaptableScope<A> typed(Class<? extends A> type)
      Retrieves an AdaptableScope for the given IAdaptable -compliant type.
      Type Parameters:
      A - The IAdaptable (sub-)type to return an AdaptableScope for.
      Parameters:
      type - The type of the AdaptableScope.
      Returns:
      The static AdaptableScope instance for the given type.