@Override public boolean equals(Object obj) { if (obj instanceof Scoping) { Scoping o = (Scoping) obj; return Objects.equal(getScopeAnnotation(), o.getScopeAnnotation()) && Objects.equal(getScopeInstance(), o.getScopeInstance()); } else { return false; } }
@Override public int hashCode() { return Objects.hashCode(getScopeAnnotation(), getScopeInstance()); }
/** * Replaces annotation scopes with instance scopes using the Injector's annotation-to-instance * map. If the scope annotation has no corresponding instance, an error will be added and unscoped * will be retuned. */ static Scoping makeInjectable(Scoping scoping, InjectorImpl injector, Errors errors) { 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; } }
@Override public boolean equals(Object obj) { if (obj instanceof Scoping) { Scoping o = (Scoping) obj; return Objects.equal(getScopeAnnotation(), o.getScopeAnnotation()) && Objects.equal(getScopeInstance(), o.getScopeInstance()); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof Scoping) { Scoping o = (Scoping) obj; return Objects.equal(getScopeAnnotation(), o.getScopeAnnotation()) && Objects.equal(getScopeInstance(), o.getScopeInstance()); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof Scoping) { Scoping o = (Scoping) obj; return Objects.equal(getScopeAnnotation(), o.getScopeAnnotation()) && Objects.equal(getScopeInstance(), o.getScopeInstance()); } else { return false; } }
@Override public int hashCode() { return Objects.hashCode(getScopeAnnotation(), getScopeInstance()); }
@Override public int hashCode() { return Objects.hashCode(getScopeAnnotation(), getScopeInstance()); }
@Override public int hashCode() { return Objects.hashCode(getScopeAnnotation(), getScopeInstance()); }
@Override public boolean equals(Object obj) { if(obj instanceof Scoping) { Scoping o = (Scoping)obj; return Objects.equal(getScopeAnnotation(), o.getScopeAnnotation()) && Objects.equal(getScopeInstance(), o.getScopeInstance()); } else { return false; } }
@Override public boolean equals(Object obj) { if(obj instanceof Scoping) { Scoping o = (Scoping)obj; return Objects.equal(getScopeAnnotation(), o.getScopeAnnotation()) && Objects.equal(getScopeInstance(), o.getScopeInstance()); } else { return false; } }
@Override public int hashCode() { return Objects.hashCode(getScopeAnnotation(), getScopeInstance()); }
@Override public boolean equals(Object obj) { if(obj instanceof Scoping) { Scoping o = (Scoping)obj; return Objects.equal(getScopeAnnotation(), o.getScopeAnnotation()) && Objects.equal(getScopeInstance(), o.getScopeInstance()); } else { return false; } }
@Override public int hashCode() { return Objects.hashCode(getScopeAnnotation(), getScopeInstance()); }
@Override public int hashCode() { return Objects.hashCode(getScopeAnnotation(), getScopeInstance()); }
/** * Replaces annotation scopes with instance scopes using the Injector's annotation-to-instance * map. If the scope annotation has no corresponding instance, an error will be added and unscoped * will be retuned. */ static Scoping makeInjectable(Scoping scoping, InjectorImpl injector, Errors errors) { Class<? extends Annotation> scopeAnnotation = scoping.getScopeAnnotation(); if (scopeAnnotation == null) { return scoping; } Scope scope = injector.state.getScope(scopeAnnotation); if (scope != null) { return forInstance(scope); } errors.scopeNotFound(scopeAnnotation); return UNSCOPED; } }
/** * Replaces annotation scopes with instance scopes using the Injector's annotation-to-instance * map. If the scope annotation has no corresponding instance, an error will be added and unscoped * will be retuned. */ static Scoping makeInjectable(Scoping scoping, InjectorImpl injector, Errors errors) { Class<? extends Annotation> scopeAnnotation = scoping.getScopeAnnotation(); if (scopeAnnotation == null) { return scoping; } Scope scope = injector.state.getScope(scopeAnnotation); if (scope != null) { return forInstance(scope); } errors.scopeNotFound(scopeAnnotation); return UNSCOPED; } }
/** * Replaces annotation scopes with instance scopes using the Injector's annotation-to-instance * map. If the scope annotation has no corresponding instance, an error will be added and unscoped * will be retuned. */ static Scoping makeInjectable(Scoping scoping, InjectorImpl injector, Errors errors) { 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; }
/** * Replaces annotation scopes with instance scopes using the Injector's annotation-to-instance * map. If the scope annotation has no corresponding instance, an error will be added and unscoped * will be retuned. */ static Scoping makeInjectable(Scoping scoping, InjectorImpl injector, Errors errors) { 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; } }
/** * Replaces annotation scopes with instance scopes using the Injector's annotation-to-instance * map. If the scope annotation has no corresponding instance, an error will be added and unscoped * will be retuned. */ static Scoping makeInjectable(Scoping scoping, InjectorImpl injector, Errors errors) { 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; } }