Package com.google.inject

Examples of com.google.inject.Scope


    this.explicitBindingsMutable.put(paramKey, paramBindingImpl);
  }

  public Scope getScope(Class paramClass)
  {
    Scope localScope = (Scope)this.scopes.get(paramClass);
    return localScope != null ? localScope : this.parent.getScope(paramClass);
  }
View Full Code Here


    super(paramErrors);
  }

  public Boolean visit(ScopeBinding paramScopeBinding)
  {
    Scope localScope1 = paramScopeBinding.getScope();
    Class localClass = paramScopeBinding.getAnnotationType();
    if (!Annotations.isScopeAnnotation(localClass))
      this.errors.withSource(localClass).missingScopeAnnotation();
    if (!Annotations.isRetainedAtRuntime(localClass))
      this.errors.withSource(localClass).missingRuntimeRetention(paramScopeBinding.getSource());
    Scope localScope2 = this.injector.state.getScope((Class).Preconditions.checkNotNull(localClass, "annotation type"));
    if (localScope2 != null)
      this.errors.duplicateScopes(localScope2, localClass, localScope1);
    else
      this.injector.state.putAnnotation(localClass, (Scope).Preconditions.checkNotNull(localScope1, "scope"));
    return Boolean.valueOf(true);
View Full Code Here

    this.explicitBindingsMutable.put(paramKey, paramBindingImpl);
  }

  public Scope getScope(Class paramClass)
  {
    Scope localScope = (Scope)this.scopes.get(paramClass);
    return localScope != null ? localScope : this.parent.getScope(paramClass);
  }
View Full Code Here

  ScopeBindingProcessor(Errors errors) {
    super(errors);
  }

  @Override public Boolean visit(ScopeBinding command) {
    Scope scope = command.getScope();
    Class<? extends Annotation> annotationType = command.getAnnotationType();

    if (!Annotations.isScopeAnnotation(annotationType)) {
      errors.missingScopeAnnotation(annotationType);
      // Go ahead and bind anyway so we don't get collateral errors.
View Full Code Here

TOP

Related Classes of com.google.inject.Scope

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.