Package com.google.inject.spi

Examples of com.google.inject.spi.ScopeBinding


    Class<? extends Annotation> scopeAnnotation = scoping.getScopeAnnotation();
    if (scopeAnnotation == null) {
      return scoping;
    }

    ScopeBinding scope = injector.state.getScopeBinding(scopeAnnotation);
    if (scope != null) {
      return forInstance(scope.getScope());
    }

    errors.scopeNotFound(scopeAnnotation);
    return UNSCOPED;
  }
View Full Code Here


  public void putBinding(Key<?> key, BindingImpl<?> binding) {
    explicitBindingsMutable.put(key, binding);
  }

  public ScopeBinding getScopeBinding(Class<? extends Annotation> annotationType) {
    ScopeBinding scopeBinding = scopes.get(annotationType);
    return scopeBinding != null ? scopeBinding : parent.getScopeBinding(annotationType);
  }
View Full Code Here

    if (!Annotations.isRetainedAtRuntime(annotationType)) {
      errors.missingRuntimeRetention(annotationType);
      // Go ahead and bind anyway so we don't get collateral errors.
    }

    ScopeBinding existing = injector.state.getScopeBinding(checkNotNull(annotationType, "annotation type"));
    if (existing != null) {
      errors.duplicateScopes(existing, annotationType, scope);
    } else {
      checkNotNull(scope, "scope");
      injector.state.putScopeBinding(annotationType, command);
View Full Code Here

TOP

Related Classes of com.google.inject.spi.ScopeBinding

Copyright © 2018 www.massapicom. 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.