All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.inject.internal.PrivateElementProcessor Maven / Gradle / Ivy

package com.google.inject.internal;

import com.google.common.collect.Lists;
import com.google.inject.spi.PrivateElements;

import java.util.List;

/**
 * Handles {@code Binder.newPrivateBinder()} elements.
 */
final class PrivateElementProcessor extends AbstractProcessor {

    private final List injectorShellBuilders = Lists.newArrayList();

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

    @Override
    public Boolean visit(PrivateElements privateElements) {
        InjectorShell.Builder builder = new InjectorShell.Builder()
                .parent(injector)
                .privateElements(privateElements);
        injectorShellBuilders.add(builder);
        return true;
    }

    List getInjectorShellBuilders() {
        return injectorShellBuilders;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy