Class SessionScope

java.lang.Object
org.apache.maven.impl.di.SessionScope
All Implemented Interfaces:
Scope
Direct Known Subclasses:
SessionScope

public class SessionScope extends Object implements Scope
  • Field Details

  • Constructor Details

    • SessionScope

      public SessionScope()
  • Method Details

    • enter

      public void enter()
    • getScopeState

      protected SessionScope.ScopeState getScopeState()
    • exit

      public void exit()
    • seed

      public <T> void seed(Class<T> clazz, Supplier<T> value)
    • seed

      public <T> void seed(Class<T> clazz, T value)
    • scope

      @Nonnull public <T> Supplier<T> scope(@Nonnull Key<T> key, @Nonnull Supplier<T> unscoped)
      Description copied from interface: Scope
      Scopes a supplier of instances.

      This method wraps an unscoped instance supplier with scope-specific logic that controls when new instances are created versus when existing instances are reused.

      Specified by:
      scope in interface Scope
      Type Parameters:
      T - the type of instance being scoped
      Parameters:
      key - the key identifying the instance type
      unscoped - the original unscoped instance supplier
      Returns:
      a scoped supplier that implements the scope's caching strategy
    • createProxy

      protected <T> T createProxy(Key<T> key, Supplier<T> unscoped)
    • dispatch

      protected <T> Object dispatch(Key<T> key, Supplier<T> unscoped, Method method, Object[] args) throws Throwable
      Throws:
      Throwable
    • getInterfaces

      protected Class<?>[] getInterfaces(Class<?> superType)
    • isTypeAnnotation

      protected boolean isTypeAnnotation(Class<? extends Annotation> annotationType)
    • seededKeySupplier

      public static <T> Supplier<T> seededKeySupplier(Class<? extends T> clazz)