Package com.google.inject

Examples of com.google.inject.Scope.scope()


    Scope scope = scoping.getScopeInstance();

    try {
      SingletonScope.singletonCreationPerRootInjectorLock.set(injector.state.singletonCreationLock());
      Provider<T> scoped
          = scope.scope(key, new ProviderToInternalFactoryAdapter<T>(injector, creator));
      return new InternalFactoryToProviderAdapter<T>(scoped, source);
    } finally {
      SingletonScope.singletonCreationPerRootInjectorLock.set(null);
    }
  }
View Full Code Here


    }

    Scope scope = scoping.getScopeInstance();

    Provider<T> scoped
        = scope.scope(key, new ProviderToInternalFactoryAdapter<T>(injector, creator));
    return new InternalFactoryToProviderAdapter<T>(
        Initializables.<Provider<? extends T>>of(scoped));
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.