private void resolveScope(Annotation annotation, Injector injector) { if (stopInheritedScope) { return; } Class<? extends Annotation> annoClass = annotation.annotationType(); if (injector.isInheritedScopeStopper(annoClass)) { stopInheritedScope = true; scope = null; } else if (injector.isScope(annoClass)) { if (null != scope) { Class<? extends Annotation> newScope = injector.scopeByAlias(annoClass); if (newScope != scope) { throw new InjectException("Incompatible scope annotation found: %s", this); } } else { scope = injector.scopeByAlias(annoClass); // scope annotaton is a decorator for inject library usage, it // can't add scope annotation into annoData and make it // enter the equals and hashCode calculation, //annoData.add(new AnnoData(annotation)); } } }
private void resolveScope(Annotation annotation, Injector injector) { if (stopInheritedScope) { return; } Class<? extends Annotation> annoClass = annotation.annotationType(); if (injector.isInheritedScopeStopper(annoClass)) { stopInheritedScope = true; scope = null; } else if (injector.isScope(annoClass)) { if (null != scope) { Class<? extends Annotation> newScope = injector.scopeByAlias(annoClass); if (newScope != scope) { throw new InjectException("Incompatible scope annotation found: %s", this); } } else { scope = injector.scopeByAlias(annoClass); // scope annotaton is a decorator for inject library usage, it // can't add scope annotation into annoData and make it // enter the equals and hashCode calculation, //annoData.add(new AnnoData(annotation)); } } }