class ScopeBindingProcessor extends AbstractProcessor {

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

    @Override
    public Boolean visit(ScopeBinding command) {<FILL_FUNCTION_BODY>}
}

        Scope scope = command.getScope();
        Class<? extends Annotation> annotationType = command.getAnnotationType();

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

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

        Scope existing = injector.state.getScope(Objects.requireNonNull(annotationType, "annotation type"));
        if (existing != null) {
            errors.duplicateScopes(existing, annotationType, scope);
        } else {
            injector.state.putAnnotation(annotationType, Objects.requireNonNull(scope, "scope"));
        }

        return true;
    
<methods>public void process(Iterable<org.elasticsearch.common.inject.InjectorShell>) ,public void process(org.elasticsearch.common.inject.InjectorImpl, List<org.elasticsearch.common.inject.spi.Element>) ,public java.lang.Boolean visit(org.elasticsearch.common.inject.spi.Message) ,public java.lang.Boolean visit(org.elasticsearch.common.inject.spi.ScopeBinding) ,public java.lang.Boolean visit(InjectionRequest#RAW) ,public java.lang.Boolean visit(org.elasticsearch.common.inject.spi.StaticInjectionRequest) ,public java.lang.Boolean visit(org.elasticsearch.common.inject.spi.TypeConverterBinding) ,public java.lang.Boolean visit(Binding<T>) ,public java.lang.Boolean visit(ProviderLookup<T>) ,public java.lang.Boolean visit(org.elasticsearch.common.inject.spi.PrivateElements) ,public java.lang.Boolean visit(MembersInjectorLookup<T>) ,public java.lang.Boolean visit(org.elasticsearch.common.inject.spi.TypeListenerBinding) <variables>protected org.elasticsearch.common.inject.internal.Errors errors,protected org.elasticsearch.common.inject.InjectorImpl injector